developers
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 6871 discussions

[Maria-developers] bzr commit into Mariadb 5.2, with Maria 2.0:maria/5.2 branch (monty:2737)
by Michael Widenius 06 Jan '10
by Michael Widenius 06 Jan '10
06 Jan '10
#At lp:maria/5.2 based on revid:monty@askmonty.org-20100104215310-r3xxj77y1rk0mpmo
2737 Michael Widenius 2010-01-06
Applied Antony T Curtis patch for declaring many CHARSET objects as const
Removed compiler warnings
modified:
extra/libevent/epoll.c
extra/libevent/evbuffer.c
extra/libevent/event.c
extra/libevent/select.c
extra/libevent/signal.c
include/m_ctype.h
include/m_string.h
include/my_sys.h
include/mysql.h
include/mysql.h.pp
include/mysql/plugin.h
include/mysql/plugin.h.pp
mysys/charset-def.c
mysys/charset.c
sql-common/client.c
sql/item_cmpfunc.h
sql/sql_class.cc
sql/sql_lex.cc
storage/maria/ma_ft_boolean_search.c
storage/maria/ma_ft_parser.c
storage/maria/ma_search.c
storage/myisam/ft_boolean_search.c
storage/myisam/ft_parser.c
storage/myisam/mi_search.c
storage/pbxt/src/datadic_xt.cc
storage/pbxt/src/ha_pbxt.cc
storage/pbxt/src/myxt_xt.h
storage/pbxt/src/xt_defs.h
storage/xtradb/btr/btr0cur.c
storage/xtradb/fil/fil0fil.c
strings/conf_to_src.c
strings/ctype-big5.c
strings/ctype-bin.c
strings/ctype-cp932.c
strings/ctype-czech.c
strings/ctype-euc_kr.c
strings/ctype-eucjpms.c
strings/ctype-extra.c
strings/ctype-gb2312.c
strings/ctype-gbk.c
strings/ctype-latin1.c
strings/ctype-mb.c
strings/ctype-simple.c
strings/ctype-sjis.c
strings/ctype-tis620.c
strings/ctype-uca.c
strings/ctype-ucs2.c
strings/ctype-ujis.c
strings/ctype-utf8.c
strings/ctype-win1250ch.c
strings/ctype.c
strings/int2str.c
per-file messages:
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
=== modified file 'extra/libevent/epoll.c'
--- a/extra/libevent/epoll.c 2009-03-12 22:27:35 +0000
+++ b/extra/libevent/epoll.c 2010-01-06 19:20:16 +0000
@@ -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;
=== modified file 'extra/libevent/evbuffer.c'
--- a/extra/libevent/evbuffer.c 2009-03-12 22:27:35 +0000
+++ b/extra/libevent/evbuffer.c 2010-01-06 19:20:16 +0000
@@ -75,7 +75,8 @@ bufferevent_add(struct event *ev, int ti
*/
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;
/*
=== modified file 'extra/libevent/event.c'
--- a/extra/libevent/event.c 2009-03-12 22:27:35 +0000
+++ b/extra/libevent/event.c 2010-01-06 19:20:16 +0000
@@ -394,7 +394,8 @@ event_base_get_method(struct event_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;
=== modified file 'extra/libevent/select.c'
--- a/extra/libevent/select.c 2009-03-12 22:27:35 +0000
+++ b/extra/libevent/select.c 2010-01-06 19:20:16 +0000
@@ -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);
=== modified file 'extra/libevent/signal.c'
--- a/extra/libevent/signal.c 2009-03-12 22:27:35 +0000
+++ b/extra/libevent/signal.c 2010-01-06 19:20:16 +0000
@@ -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
=== modified file 'include/m_ctype.h'
--- a/include/m_ctype.h 2009-11-30 12:42:24 +0000
+++ b/include/m_ctype.h 2010-01-06 19:20:16 +0000
@@ -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
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_
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 *,
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 *, co
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
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 */
=== modified file 'include/m_string.h'
--- a/include/m_string.h 2009-08-13 21:12:12 +0000
+++ b/include/m_string.h 2010-01-06 19:20:16 +0000
@@ -89,8 +89,8 @@ extern char *stpcpy(char *, const char *
#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];
=== modified file 'include/my_sys.h'
--- a/include/my_sys.h 2010-01-04 17:54:42 +0000
+++ b/include/my_sys.h 2010-01-06 19:20:16 +0000
@@ -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);
=== modified file 'include/mysql.h'
--- a/include/mysql.h 2009-12-03 11:19:05 +0000
+++ b/include/mysql.h 2010-01-06 19:20:16 +0000
@@ -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;
=== modified file 'include/mysql.h.pp'
--- a/include/mysql.h.pp 2009-12-03 11:19:05 +0000
+++ b/include/mysql.h.pp 2010-01-06 19:20:16 +0000
@@ -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;
=== modified file 'include/mysql/plugin.h'
--- a/include/mysql/plugin.h 2009-11-30 13:36:06 +0000
+++ b/include/mysql/plugin.h 2010-01-06 19:20:16 +0000
@@ -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;
=== modified file 'include/mysql/plugin.h.pp'
--- a/include/mysql/plugin.h.pp 2009-11-30 13:36:06 +0000
+++ b/include/mysql/plugin.h.pp 2010-01-06 19:20:16 +0000
@@ -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;
=== modified file 'mysys/charset-def.c'
--- a/mysys/charset-def.c 2009-11-30 12:42:24 +0000
+++ b/mysys/charset-def.c 2010-01-06 19:20:16 +0000
@@ -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
/* Copy compiled charsets */
for (cs=compiled_charsets; cs->name; cs++)
- add_compiled_collation(cs);
+ add_compiled_collation((struct charset_info_st *) cs);
return FALSE;
}
=== modified file 'mysys/charset.c'
--- a/mysys/charset.c 2009-09-07 20:50:10 +0000
+++ b/mysys/charset.c 2010-01-06 19:20:16 +0000
@@ -53,21 +53,18 @@ get_collation_number_internal(const char
}
-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_I
}
-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(CHA
-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
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, CHA
}
-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 *c
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 *c
}
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 *c
*/
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 *c
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(m
*/
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(m
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 charse
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;
=== modified file 'sql-common/client.c'
--- a/sql-common/client.c 2009-12-03 15:26:54 +0000
+++ b/sql-common/client.c 2010-01-06 19:20:16 +0000
@@ -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)
=== modified file 'sql/item_cmpfunc.h'
--- a/sql/item_cmpfunc.h 2009-12-03 11:19:05 +0000
+++ b/sql/item_cmpfunc.h 2010-01-06 19:20:16 +0000
@@ -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);
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2010-01-04 17:54:42 +0000
+++ b/sql/sql_class.cc 2010-01-06 19:20:16 +0000
@@ -3187,7 +3187,7 @@ extern "C" unsigned long thd_get_thread_
#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());
}
=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc 2010-01-04 17:54:42 +0000
+++ b/sql/sql_lex.cc 2010-01-06 19:20:16 +0000
@@ -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
=== modified file 'storage/maria/ma_ft_boolean_search.c'
--- a/storage/maria/ma_ft_boolean_search.c 2009-11-30 13:36:06 +0000
+++ b/storage/maria/ma_ft_boolean_search.c 2010-01-06 19:20:16 +0000
@@ -592,7 +592,7 @@ FT_INFO * maria_ft_init_boolean_search(M
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;
=== modified file 'storage/maria/ma_ft_parser.c'
--- a/storage/maria/ma_ft_parser.c 2009-11-30 13:36:06 +0000
+++ b/storage/maria/ma_ft_parser.c 2010-01-06 19:20:16 +0000
@@ -254,7 +254,8 @@ void maria_ft_parse_init(TREE *wtree, CH
{
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;
}
=== modified file 'storage/maria/ma_search.c'
--- a/storage/maria/ma_search.c 2009-05-06 12:03:24 +0000
+++ b/storage/maria/ma_search.c 2010-01-06 19:20:16 +0000
@@ -389,7 +389,7 @@ int _ma_prefix_search(const MARIA_KEY *k
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
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;
=== modified file 'storage/myisam/ft_boolean_search.c'
--- a/storage/myisam/ft_boolean_search.c 2009-11-30 13:36:06 +0000
+++ b/storage/myisam/ft_boolean_search.c 2010-01-06 19:20:16 +0000
@@ -593,7 +593,7 @@ FT_INFO * ft_init_boolean_search(MI_INFO
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;
=== modified file 'storage/myisam/ft_parser.c'
--- a/storage/myisam/ft_parser.c 2009-11-30 13:36:06 +0000
+++ b/storage/myisam/ft_parser.c 2010-01-06 19:20:16 +0000
@@ -252,7 +252,8 @@ void ft_parse_init(TREE *wtree, CHARSET_
{
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;
}
=== modified file 'storage/myisam/mi_search.c'
--- a/storage/myisam/mi_search.c 2009-12-03 11:19:05 +0000
+++ b/storage/myisam/mi_search.c 2010-01-06 19:20:16 +0000
@@ -300,7 +300,7 @@ int _mi_prefix_search(MI_INFO *info, reg
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 *
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;
=== modified file 'storage/pbxt/src/datadic_xt.cc'
--- a/storage/pbxt/src/datadic_xt.cc 2009-11-24 10:55:06 +0000
+++ b/storage/pbxt/src/datadic_xt.cc 2010-01-06 19:20:16 +0000
@@ -396,7 +396,7 @@ void XTToken::expectNumber(XTThreadPtr s
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(XTThre
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;
=== modified file 'storage/pbxt/src/ha_pbxt.cc'
--- a/storage/pbxt/src/ha_pbxt.cc 2009-11-27 15:37:02 +0000
+++ b/storage/pbxt/src/ha_pbxt.cc 2010-01-06 19:20:16 +0000
@@ -1552,7 +1552,7 @@ static int pbxt_prepare(handlerton *hton
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(TH
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);
=== modified file 'storage/pbxt/src/myxt_xt.h'
--- a/storage/pbxt/src/myxt_xt.h 2009-11-27 15:37:02 +0000
+++ b/storage/pbxt/src/myxt_xt.h 2010-01-06 19:20:16 +0000
@@ -69,17 +69,17 @@ void myxt_free_dictionary(XTThreadPtr s
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);
=== modified file 'storage/pbxt/src/xt_defs.h'
--- a/storage/pbxt/src/xt_defs.h 2009-11-24 10:55:06 +0000
+++ b/storage/pbxt/src/xt_defs.h 2010-01-06 19:20:16 +0000
@@ -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
#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
=== modified file 'storage/xtradb/btr/btr0cur.c'
--- a/storage/xtradb/btr/btr0cur.c 2009-11-13 21:26:08 +0000
+++ b/storage/xtradb/btr/btr0cur.c 2010-01-06 19:20:16 +0000
@@ -3302,8 +3302,9 @@ btr_estimate_number_of_different_key_val
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;
=== modified file 'storage/xtradb/fil/fil0fil.c'
--- a/storage/xtradb/fil/fil0fil.c 2009-11-29 23:08:56 +0000
+++ b/storage/xtradb/fil/fil0fil.c 2010-01-06 19:20:16 +0000
@@ -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);
=== modified file 'strings/conf_to_src.c'
--- a/strings/conf_to_src.c 2009-07-02 10:15:33 +0000
+++ b/strings/conf_to_src.c 2010-01-06 19:20:16 +0000
@@ -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, co
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
(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_
}
}
- 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))
=== modified file 'strings/ctype-big5.c'
--- a/strings/ctype-big5.c 2008-04-23 06:06:26 +0000
+++ b/strings/ctype-big5.c 2010-01-06 19:20:16 +0000
@@ -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
/* 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 cod
/* 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_big
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 */
=== modified file 'strings/ctype-bin.c'
--- a/strings/ctype-bin.c 2007-06-05 22:22:35 +0000
+++ b/strings/ctype-bin.c 2010-01-06 19:20:16 +0000
@@ -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_han
};
-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 */
=== modified file 'strings/ctype-cp932.c'
--- a/strings/ctype-cp932.c 2009-05-05 06:55:22 +0000
+++ b/strings/ctype-cp932.c 2010-01-06 19:20:16 +0000
@@ -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(CHARS
}
/* 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 co
}
/* 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_han
};
-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_c
&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 */
=== modified file 'strings/ctype-czech.c'
--- a/strings/ctype-czech.c 2007-05-10 09:59:39 +0000
+++ b/strings/ctype-czech.c 2010-01-06 19:20:16 +0000
@@ -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(CHARS
#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
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 */
=== modified file 'strings/ctype-euc_kr.c'
--- a/strings/ctype-euc_kr.c 2009-07-24 06:27:23 +0000
+++ b/strings/ctype-euc_kr.c 2010-01-06 19:20:16 +0000
@@ -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_INF
/* 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
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_han
};
-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 */
=== modified file 'strings/ctype-eucjpms.c'
--- a/strings/ctype-eucjpms.c 2008-02-20 18:49:26 +0000
+++ b/strings/ctype-eucjpms.c 2010-01-06 19:20:16 +0000
@@ -33,7 +33,7 @@ ctype-ujis.c file.
#ifdef HAVE_CHARSET_eucjpms
-static uchar NEAR ctype_eucjpms[257] =
+static const uchar NEAR ctype_eucjpms[257] =
{
0, /* For standard library */
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */
@@ -70,7 +70,7 @@ static uchar NEAR ctype_eucjpms[257] =
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000,
};
-static uchar NEAR to_lower_eucjpms[]=
+static const uchar NEAR to_lower_eucjpms[]=
{
'\000','\001','\002','\003','\004','\005','\006','\007',
'\010','\011','\012','\013','\014','\015','\016','\017',
@@ -106,7 +106,7 @@ static uchar NEAR to_lower_eucjpms[]=
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
};
-static uchar NEAR to_upper_eucjpms[]=
+static const uchar NEAR to_upper_eucjpms[]=
{
'\000','\001','\002','\003','\004','\005','\006','\007',
'\010','\011','\012','\013','\014','\015','\016','\017',
@@ -142,7 +142,7 @@ static uchar NEAR to_upper_eucjpms[]=
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
};
-static uchar NEAR sort_order_eucjpms[]=
+static const uchar NEAR sort_order_eucjpms[]=
{
'\000','\001','\002','\003','\004','\005','\006','\007',
'\010','\011','\012','\013','\014','\015','\016','\017',
@@ -201,7 +201,7 @@ static uint mbcharlen_eucjpms(CHARSET_IN
}
-static uint16 tab_jisx0201_uni[256]={
+static const uint16 tab_jisx0201_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,
@@ -270,7 +270,7 @@ my_wc_mb_jisx0201(CHARSET_INFO *cs __att
/* page 0 0x2121-0x217E */
-static uint16 tab_jisx0208_uni0[]={
+static const uint16 tab_jisx0208_uni0[]={
0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B,
0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,
0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,
@@ -285,7 +285,7 @@ static uint16 tab_jisx0208_uni0[]={
0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7};
/* page 1 0x2221-0x227E */
-static uint16 tab_jisx0208_uni1[]={
+static const uint16 tab_jisx0208_uni1[]={
0x25C6,0x25A1,0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x203B,
0x3012,0x2192,0x2190,0x2191,0x2193,0x3013, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -300,7 +300,7 @@ static uint16 tab_jisx0208_uni1[]={
0x00B6, 0, 0, 0, 0,0x25EF};
/* page 2 0x2330-0x237A */
-static uint16 tab_jisx0208_uni2[]={
+static const uint16 tab_jisx0208_uni2[]={
0xFF10,0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17,
0xFF18,0xFF19, 0, 0, 0, 0, 0, 0,
0,0xFF21,0xFF22,0xFF23,0xFF24,0xFF25,0xFF26,0xFF27,
@@ -313,7 +313,7 @@ static uint16 tab_jisx0208_uni2[]={
0xFF58,0xFF59,0xFF5A};
/* page 3 0x2421-0x2473 */
-static uint16 tab_jisx0208_uni3[]={
+static const uint16 tab_jisx0208_uni3[]={
0x3041,0x3042,0x3043,0x3044,0x3045,0x3046,0x3047,0x3048,
0x3049,0x304A,0x304B,0x304C,0x304D,0x304E,0x304F,0x3050,
0x3051,0x3052,0x3053,0x3054,0x3055,0x3056,0x3057,0x3058,
@@ -327,7 +327,7 @@ static uint16 tab_jisx0208_uni3[]={
0x3091,0x3092,0x3093};
/* page 4 0x2521-0x2576 */
-static uint16 tab_jisx0208_uni4[]={
+static const uint16 tab_jisx0208_uni4[]={
0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8,
0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0,
0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8,
@@ -341,7 +341,7 @@ static uint16 tab_jisx0208_uni4[]={
0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6};
/* page 5 0x2621-0x2658 */
-static uint16 tab_jisx0208_uni5[]={
+static const uint16 tab_jisx0208_uni5[]={
0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,
0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,
0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,
@@ -352,7 +352,7 @@ static uint16 tab_jisx0208_uni5[]={
};
/* page 6 0x2721-0x2771 */
-static uint16 tab_jisx0208_uni6[]={
+static const uint16 tab_jisx0208_uni6[]={
0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416,
0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,
@@ -366,7 +366,7 @@ static uint16 tab_jisx0208_uni6[]={
0x044F};
/* page 7 0x2821-0x2840 */
-static uint16 tab_jisx0208_uni7[]={
+static const uint16 tab_jisx0208_uni7[]={
0x2500,0x2502,0x250C,0x2510,0x2518,0x2514,0x251C,0x252C,
0x2524,0x2534,0x253C,0x2501,0x2503,0x250F,0x2513,0x251B,
0x2517,0x2523,0x2533,0x252B,0x253B,0x254B,0x2520,0x252F,
@@ -374,7 +374,7 @@ static uint16 tab_jisx0208_uni7[]={
};
/* page 8 0x3021-0x307E */
-static uint16 tab_jisx0208_uni8[]={
+static const uint16 tab_jisx0208_uni8[]={
0x4E9C,0x5516,0x5A03,0x963F,0x54C0,0x611B,0x6328,0x59F6,
0x9022,0x8475,0x831C,0x7A50,0x60AA,0x63E1,0x6E25,0x65ED,
0x8466,0x82A6,0x9BF5,0x6893,0x5727,0x65A1,0x6271,0x5B9B,
@@ -389,7 +389,7 @@ static uint16 tab_jisx0208_uni8[]={
0x59FB,0x5F15,0x98F2,0x6DEB,0x80E4,0x852D};
/* page 9 0x3121-0x317E */
-static uint16 tab_jisx0208_uni9[]={
+static const uint16 tab_jisx0208_uni9[]={
0x9662,0x9670,0x96A0,0x97FB,0x540B,0x53F3,0x5B87,0x70CF,
0x7FBD,0x8FC2,0x96E8,0x536F,0x9D5C,0x7ABA,0x4E11,0x7893,
0x81FC,0x6E26,0x5618,0x5504,0x6B1D,0x851A,0x9C3B,0x59E5,
@@ -404,7 +404,7 @@ static uint16 tab_jisx0208_uni9[]={
0x7525,0x51F9,0x592E,0x5965,0x5F80,0x5FDC};
/* page 10 0x3221-0x327E */
-static uint16 tab_jisx0208_uni10[]={
+static const uint16 tab_jisx0208_uni10[]={
0x62BC,0x65FA,0x6A2A,0x6B27,0x6BB4,0x738B,0x7FC1,0x8956,
0x9D2C,0x9D0E,0x9EC4,0x5CA1,0x6C96,0x837B,0x5104,0x5C4B,
0x61B6,0x81C6,0x6876,0x7261,0x4E59,0x4FFA,0x5378,0x6069,
@@ -419,7 +419,7 @@ static uint16 tab_jisx0208_uni10[]={
0x6094,0x6062,0x61D0,0x6212,0x62D0,0x6539};
/* page 11 0x3321-0x337E */
-static uint16 tab_jisx0208_uni11[]={
+static const uint16 tab_jisx0208_uni11[]={
0x9B41,0x6666,0x68B0,0x6D77,0x7070,0x754C,0x7686,0x7D75,
0x82A5,0x87F9,0x958B,0x968E,0x8C9D,0x51F1,0x52BE,0x5916,
0x54B3,0x5BB3,0x5D16,0x6168,0x6982,0x6DAF,0x788D,0x84CB,
@@ -434,7 +434,7 @@ static uint16 tab_jisx0208_uni11[]={
0x938C,0x565B,0x9D28,0x6822,0x8305,0x8431};
/* page 12 0x3421-0x347E */
-static uint16 tab_jisx0208_uni12[]={
+static const uint16 tab_jisx0208_uni12[]={
0x7CA5,0x5208,0x82C5,0x74E6,0x4E7E,0x4F83,0x51A0,0x5BD2,
0x520A,0x52D8,0x52E7,0x5DFB,0x559A,0x582A,0x59E6,0x5B8C,
0x5B98,0x5BDB,0x5E72,0x5E79,0x60A3,0x611F,0x6163,0x61BE,
@@ -449,7 +449,7 @@ static uint16 tab_jisx0208_uni12[]={
0x673A,0x65D7,0x65E2,0x671F,0x68CB,0x68C4};
/* page 13 0x3521-0x357E */
-static uint16 tab_jisx0208_uni13[]={
+static const uint16 tab_jisx0208_uni13[]={
0x6A5F,0x5E30,0x6BC5,0x6C17,0x6C7D,0x757F,0x7948,0x5B63,
0x7A00,0x7D00,0x5FBD,0x898F,0x8A18,0x8CB4,0x8D77,0x8ECC,
0x8F1D,0x98E2,0x9A0E,0x9B3C,0x4E80,0x507D,0x5100,0x5993,
@@ -464,7 +464,7 @@ static uint16 tab_jisx0208_uni13[]={
0x6F01,0x79A6,0x9B5A,0x4EA8,0x4EAB,0x4EAC};
/* page 14 0x3621-0x367E */
-static uint16 tab_jisx0208_uni14[]={
+static const uint16 tab_jisx0208_uni14[]={
0x4F9B,0x4FA0,0x50D1,0x5147,0x7AF6,0x5171,0x51F6,0x5354,
0x5321,0x537F,0x53EB,0x55AC,0x5883,0x5CE1,0x5F37,0x5F4A,
0x602F,0x6050,0x606D,0x631F,0x6559,0x6A4B,0x6CC1,0x72C2,
@@ -479,7 +479,7 @@ static uint16 tab_jisx0208_uni14[]={
0x9685,0x4E32,0x6ADB,0x91E7,0x5C51,0x5C48};
/* page 15 0x3721-0x377E */
-static uint16 tab_jisx0208_uni15[]={
+static const uint16 tab_jisx0208_uni15[]={
0x6398,0x7A9F,0x6C93,0x9774,0x8F61,0x7AAA,0x718A,0x9688,
0x7C82,0x6817,0x7E70,0x6851,0x936C,0x52F2,0x541B,0x85AB,
0x8A13,0x7FA4,0x8ECD,0x90E1,0x5366,0x8888,0x7941,0x4FC2,
@@ -494,7 +494,7 @@ static uint16 tab_jisx0208_uni15[]={
0x5ACC,0x5EFA,0x61B2,0x61F8,0x62F3,0x6372};
/* page 16 0x3821-0x387E */
-static uint16 tab_jisx0208_uni16[]={
+static const uint16 tab_jisx0208_uni16[]={
0x691C,0x6A29,0x727D,0x72AC,0x732E,0x7814,0x786F,0x7D79,
0x770C,0x80A9,0x898B,0x8B19,0x8CE2,0x8ED2,0x9063,0x9375,
0x967A,0x9855,0x9A13,0x9E78,0x5143,0x539F,0x53B3,0x5E7B,
@@ -509,7 +509,7 @@ static uint16 tab_jisx0208_uni16[]={
0x529F,0x52B9,0x52FE,0x539A,0x53E3,0x5411};
/* page 17 0x3921-0x397E */
-static uint16 tab_jisx0208_uni17[]={
+static const uint16 tab_jisx0208_uni17[]={
0x540E,0x5589,0x5751,0x57A2,0x597D,0x5B54,0x5B5D,0x5B8F,
0x5DE5,0x5DE7,0x5DF7,0x5E78,0x5E83,0x5E9A,0x5EB7,0x5F18,
0x6052,0x614C,0x6297,0x62D8,0x63A7,0x653B,0x6602,0x6643,
@@ -524,7 +524,7 @@ static uint16 tab_jisx0208_uni17[]={
0x7511,0x5FFD,0x60DA,0x9AA8,0x72DB,0x8FBC};
/* page 18 0x3A21-0x3A7E */
-static uint16 tab_jisx0208_uni18[]={
+static const uint16 tab_jisx0208_uni18[]={
0x6B64,0x9803,0x4ECA,0x56F0,0x5764,0x58BE,0x5A5A,0x6068,
0x61C7,0x660F,0x6606,0x6839,0x68B1,0x6DF7,0x75D5,0x7D3A,
0x826E,0x9B42,0x4E9B,0x4F50,0x53C9,0x5506,0x5D6F,0x5DE6,
@@ -539,7 +539,7 @@ static uint16 tab_jisx0208_uni18[]={
0x685C,0x9BAD,0x7B39,0x5319,0x518A,0x5237};
/* page 19 0x3B21-0x3B7E */
-static uint16 tab_jisx0208_uni19[]={
+static const uint16 tab_jisx0208_uni19[]={
0x5BDF,0x62F6,0x64AE,0x64E6,0x672D,0x6BBA,0x85A9,0x96D1,
0x7690,0x9BD6,0x634C,0x9306,0x9BAB,0x76BF,0x6652,0x4E09,
0x5098,0x53C2,0x5C71,0x60E8,0x6492,0x6563,0x685F,0x71E6,
@@ -554,7 +554,7 @@ static uint16 tab_jisx0208_uni19[]={
0x5150,0x5B57,0x5BFA,0x6148,0x6301,0x6642};
/* page 20 0x3C21-0x3C7E */
-static uint16 tab_jisx0208_uni20[]={
+static const uint16 tab_jisx0208_uni20[]={
0x6B21,0x6ECB,0x6CBB,0x723E,0x74BD,0x75D4,0x78C1,0x793A,
0x800C,0x8033,0x81EA,0x8494,0x8F9E,0x6C50,0x9E7F,0x5F0F,
0x8B58,0x9D2B,0x7AFA,0x8EF8,0x5B8D,0x96EB,0x4E03,0x53F1,
@@ -569,7 +569,7 @@ static uint16 tab_jisx0208_uni20[]={
0x6A39,0x7DAC,0x9700,0x56DA,0x53CE,0x5468};
/* page 21 0x3D21-0x3D7E */
-static uint16 tab_jisx0208_uni21[]={
+static const uint16 tab_jisx0208_uni21[]={
0x5B97,0x5C31,0x5DDE,0x4FEE,0x6101,0x62FE,0x6D32,0x79C0,
0x79CB,0x7D42,0x7E4D,0x7FD2,0x81ED,0x821F,0x8490,0x8846,
0x8972,0x8B90,0x8E74,0x8F2F,0x9031,0x914B,0x916C,0x96C6,
@@ -584,7 +584,7 @@ static uint16 tab_jisx0208_uni21[]={
0x5F90,0x6055,0x92E4,0x9664,0x50B7,0x511F};
/* page 22 0x3E21-0x3E7E */
-static uint16 tab_jisx0208_uni22[]={
+static const uint16 tab_jisx0208_uni22[]={
0x52DD,0x5320,0x5347,0x53EC,0x54E8,0x5546,0x5531,0x5617,
0x5968,0x59BE,0x5A3C,0x5BB5,0x5C06,0x5C0F,0x5C11,0x5C1A,
0x5E84,0x5E8A,0x5EE0,0x5F70,0x627F,0x6284,0x62DB,0x638C,
@@ -599,7 +599,7 @@ static uint16 tab_jisx0208_uni22[]={
0x8B72,0x91B8,0x9320,0x5631,0x57F4,0x98FE};
/* page 23 0x3F21-0x3F7E */
-static uint16 tab_jisx0208_uni23[]={
+static const uint16 tab_jisx0208_uni23[]={
0x62ED,0x690D,0x6B96,0x71ED,0x7E54,0x8077,0x8272,0x89E6,
0x98DF,0x8755,0x8FB1,0x5C3B,0x4F38,0x4FE1,0x4FB5,0x5507,
0x5A20,0x5BDD,0x5BE9,0x5FC3,0x614E,0x632F,0x65B0,0x664B,
@@ -614,7 +614,7 @@ static uint16 tab_jisx0208_uni23[]={
0x6749,0x6919,0x83C5,0x9817,0x96C0,0x88FE};
/* page 24 0x4021-0x407E */
-static uint16 tab_jisx0208_uni24[]={
+static const uint16 tab_jisx0208_uni24[]={
0x6F84,0x647A,0x5BF8,0x4E16,0x702C,0x755D,0x662F,0x51C4,
0x5236,0x52E2,0x59D3,0x5F81,0x6027,0x6210,0x653F,0x6574,
0x661F,0x6674,0x68F2,0x6816,0x6B63,0x6E05,0x7272,0x751F,
@@ -629,7 +629,7 @@ static uint16 tab_jisx0208_uni24[]={
0x714E,0x717D,0x65CB,0x7A7F,0x7BAD,0x7DDA};
/* page 25 0x4121-0x417E */
-static uint16 tab_jisx0208_uni25[]={
+static const uint16 tab_jisx0208_uni25[]={
0x7E4A,0x7FA8,0x817A,0x821B,0x8239,0x85A6,0x8A6E,0x8CCE,
0x8DF5,0x9078,0x9077,0x92AD,0x9291,0x9583,0x9BAE,0x524D,
0x5584,0x6F38,0x7136,0x5168,0x7985,0x7E55,0x81B3,0x7CCE,
@@ -644,7 +644,7 @@ static uint16 tab_jisx0208_uni25[]={
0x9397,0x971C,0x9A12,0x50CF,0x5897,0x618E};
/* page 26 0x4221-0x427E */
-static uint16 tab_jisx0208_uni26[]={
+static const uint16 tab_jisx0208_uni26[]={
0x81D3,0x8535,0x8D08,0x9020,0x4FC3,0x5074,0x5247,0x5373,
0x606F,0x6349,0x675F,0x6E2C,0x8DB3,0x901F,0x4FD7,0x5C5E,
0x8CCA,0x65CF,0x7D9A,0x5352,0x8896,0x5176,0x63C3,0x5B58,
@@ -659,7 +659,7 @@ static uint16 tab_jisx0208_uni26[]={
0x6FC1,0x8AFE,0x8338,0x51E7,0x86F8,0x53EA};
/* page 27 0x4321-0x437E */
-static uint16 tab_jisx0208_uni27[]={
+static const uint16 tab_jisx0208_uni27[]={
0x53E9,0x4F46,0x9054,0x8FB0,0x596A,0x8131,0x5DFD,0x7AEA,
0x8FBF,0x68DA,0x8C37,0x72F8,0x9C48,0x6A3D,0x8AB0,0x4E39,
0x5358,0x5606,0x5766,0x62C5,0x63A2,0x65E6,0x6B4E,0x6DE1,
@@ -674,7 +674,7 @@ static uint16 tab_jisx0208_uni27[]={
0x8CAF,0x4E01,0x5146,0x51CB,0x558B,0x5BF5};
/* page 28 0x4421-0x447E */
-static uint16 tab_jisx0208_uni28[]={
+static const uint16 tab_jisx0208_uni28[]={
0x5E16,0x5E33,0x5E81,0x5F14,0x5F35,0x5F6B,0x5FB4,0x61F2,
0x6311,0x66A2,0x671D,0x6F6E,0x7252,0x753A,0x773A,0x8074,
0x8139,0x8178,0x8776,0x8ABF,0x8ADC,0x8D85,0x8DF3,0x929A,
@@ -689,7 +689,7 @@ static uint16 tab_jisx0208_uni28[]={
0x7DE0,0x8247,0x8A02,0x8AE6,0x8E44,0x9013};
/* page 29 0x4521-0x457E */
-static uint16 tab_jisx0208_uni29[]={
+static const uint16 tab_jisx0208_uni29[]={
0x90B8,0x912D,0x91D8,0x9F0E,0x6CE5,0x6458,0x64E2,0x6575,
0x6EF4,0x7684,0x7B1B,0x9069,0x93D1,0x6EBA,0x54F2,0x5FB9,
0x64A4,0x8F4D,0x8FED,0x9244,0x5178,0x586B,0x5929,0x5C55,
@@ -704,7 +704,7 @@ static uint16 tab_jisx0208_uni29[]={
0x7B49,0x7B54,0x7B52,0x7CD6,0x7D71,0x5230};
/* page 30 0x4621-0x467E */
-static uint16 tab_jisx0208_uni30[]={
+static const uint16 tab_jisx0208_uni30[]={
0x8463,0x8569,0x85E4,0x8A0E,0x8B04,0x8C46,0x8E0F,0x9003,
0x900F,0x9419,0x9676,0x982D,0x9A30,0x95D8,0x50CD,0x52D5,
0x540C,0x5802,0x5C0E,0x61A7,0x649E,0x6D1E,0x77B3,0x7AE5,
@@ -719,7 +719,7 @@ static uint16 tab_jisx0208_uni30[]={
0x8089,0x8679,0x5EFF,0x65E5,0x4E73,0x5165};
/* page 31 0x4721-0x477E */
-static uint16 tab_jisx0208_uni31[]={
+static const uint16 tab_jisx0208_uni31[]={
0x5982,0x5C3F,0x97EE,0x4EFB,0x598A,0x5FCD,0x8A8D,0x6FE1,
0x79B0,0x7962,0x5BE7,0x8471,0x732B,0x71B1,0x5E74,0x5FF5,
0x637B,0x649A,0x71C3,0x7C98,0x4E43,0x5EFC,0x4E4B,0x57DC,
@@ -734,7 +734,7 @@ static uint16 tab_jisx0208_uni31[]={
0x6F20,0x7206,0x7E1B,0x83AB,0x99C1,0x9EA6};
/* page 32 0x4821-0x487E */
-static uint16 tab_jisx0208_uni32[]={
+static const uint16 tab_jisx0208_uni32[]={
0x51FD,0x7BB1,0x7872,0x7BB8,0x8087,0x7B48,0x6AE8,0x5E61,
0x808C,0x7551,0x7560,0x516B,0x9262,0x6E8C,0x767A,0x9197,
0x9AEA,0x4F10,0x7F70,0x629C,0x7B4F,0x95A5,0x9CE9,0x567A,
@@ -749,7 +749,7 @@ static uint16 tab_jisx0208_uni32[]={
0x5FAE,0x6787,0x6BD8,0x7435,0x7709,0x7F8E};
/* page 33 0x4921-0x497E */
-static uint16 tab_jisx0208_uni33[]={
+static const uint16 tab_jisx0208_uni33[]={
0x9F3B,0x67CA,0x7A17,0x5339,0x758B,0x9AED,0x5F66,0x819D,
0x83F1,0x8098,0x5F3C,0x5FC5,0x7562,0x7B46,0x903C,0x6867,
0x59EB,0x5A9B,0x7D10,0x767E,0x8B2C,0x4FF5,0x5F6A,0x6A19,
@@ -764,7 +764,7 @@ static uint16 tab_jisx0208_uni33[]={
0x8557,0x4F0F,0x526F,0x5FA9,0x5E45,0x670D};
/* page 34 0x4A21-0x4A7E */
-static uint16 tab_jisx0208_uni34[]={
+static const uint16 tab_jisx0208_uni34[]={
0x798F,0x8179,0x8907,0x8986,0x6DF5,0x5F17,0x6255,0x6CB8,
0x4ECF,0x7269,0x9B92,0x5206,0x543B,0x5674,0x58B3,0x61A4,
0x626E,0x711A,0x596E,0x7C89,0x7CDE,0x7D1B,0x96F0,0x6587,
@@ -779,7 +779,7 @@ static uint16 tab_jisx0208_uni34[]={
0x5E96,0x62B1,0x6367,0x653E,0x65B9,0x670B};
/* page 35 0x4B21-0x4B7E */
-static uint16 tab_jisx0208_uni35[]={
+static const uint16 tab_jisx0208_uni35[]={
0x6CD5,0x6CE1,0x70F9,0x7832,0x7E2B,0x80DE,0x82B3,0x840C,
0x84EC,0x8702,0x8912,0x8A2A,0x8C4A,0x90A6,0x92D2,0x98FD,
0x9CF3,0x9D6C,0x4E4F,0x4EA1,0x508D,0x5256,0x574A,0x59A8,
@@ -794,7 +794,7 @@ static uint16 tab_jisx0208_uni35[]={
0x4FAD,0x7E6D,0x9EBF,0x4E07,0x6162,0x6E80};
/* page 36 0x4C21-0x4C7E */
-static uint16 tab_jisx0208_uni36[]={
+static const uint16 tab_jisx0208_uni36[]={
0x6F2B,0x8513,0x5473,0x672A,0x9B45,0x5DF3,0x7B95,0x5CAC,
0x5BC6,0x871C,0x6E4A,0x84D1,0x7A14,0x8108,0x5999,0x7C8D,
0x6C11,0x7720,0x52D9,0x5922,0x7121,0x725F,0x77DB,0x9727,
@@ -809,7 +809,7 @@ static uint16 tab_jisx0208_uni36[]={
0x85AE,0x9453,0x6109,0x6108,0x6CB9,0x7652};
/* page 37 0x4D21-0x4D7E */
-static uint16 tab_jisx0208_uni37[]={
+static const uint16 tab_jisx0208_uni37[]={
0x8AED,0x8F38,0x552F,0x4F51,0x512A,0x52C7,0x53CB,0x5BA5,
0x5E7D,0x60A0,0x6182,0x63D6,0x6709,0x67DA,0x6E67,0x6D8C,
0x7336,0x7337,0x7531,0x7950,0x88D5,0x8A98,0x904A,0x9091,
@@ -824,7 +824,7 @@ static uint16 tab_jisx0208_uni37[]={
0x540F,0x5C65,0x674E,0x68A8,0x7406,0x7483};
/* page 38 0x4E21-0x4E7E */
-static uint16 tab_jisx0208_uni38[]={
+static const uint16 tab_jisx0208_uni38[]={
0x75E2,0x88CF,0x88E1,0x91CC,0x96E2,0x9678,0x5F8B,0x7387,
0x7ACB,0x844E,0x63A0,0x7565,0x5289,0x6D41,0x6E9C,0x7409,
0x7559,0x786B,0x7C92,0x9686,0x7ADC,0x9F8D,0x4FB6,0x616E,
@@ -839,7 +839,7 @@ static uint16 tab_jisx0208_uni38[]={
0x6190,0x6F23,0x7149,0x7C3E,0x7DF4,0x806F};
/* page 39 0x4F21-0x4F53 */
-static uint16 tab_jisx0208_uni39[]={
+static const uint16 tab_jisx0208_uni39[]={
0x84EE,0x9023,0x932C,0x5442,0x9B6F,0x6AD3,0x7089,0x8CC2,
0x8DEF,0x9732,0x52B4,0x5A41,0x5ECA,0x5F04,0x6717,0x697C,
0x6994,0x6D6A,0x6F0F,0x7262,0x72FC,0x7BED,0x8001,0x807E,
@@ -849,7 +849,7 @@ static uint16 tab_jisx0208_uni39[]={
0x6E7E,0x7897,0x8155};
/* page 40 0x5021-0x507E */
-static uint16 tab_jisx0208_uni40[]={
+static const uint16 tab_jisx0208_uni40[]={
0x5F0C,0x4E10,0x4E15,0x4E2A,0x4E31,0x4E36,0x4E3C,0x4E3F,
0x4E42,0x4E56,0x4E58,0x4E82,0x4E85,0x8C6B,0x4E8A,0x8212,
0x5F0D,0x4E8E,0x4E9E,0x4E9F,0x4EA0,0x4EA2,0x4EB0,0x4EB3,
@@ -864,7 +864,7 @@ static uint16 tab_jisx0208_uni40[]={
0x5078,0x5080,0x509A,0x5085,0x50B4,0x50B2};
/* page 41 0x5121-0x517E */
-static uint16 tab_jisx0208_uni41[]={
+static const uint16 tab_jisx0208_uni41[]={
0x50C9,0x50CA,0x50B3,0x50C2,0x50D6,0x50DE,0x50E5,0x50ED,
0x50E3,0x50EE,0x50F9,0x50F5,0x5109,0x5101,0x5102,0x5116,
0x5115,0x5114,0x511A,0x5121,0x513A,0x5137,0x513C,0x513B,
@@ -879,7 +879,7 @@ static uint16 tab_jisx0208_uni41[]={
0x5294,0x5292,0x5271,0x5288,0x5291,0x8FA8};
/* page 42 0x5221-0x527E */
-static uint16 tab_jisx0208_uni42[]={
+static const uint16 tab_jisx0208_uni42[]={
0x8FA7,0x52AC,0x52AD,0x52BC,0x52B5,0x52C1,0x52CD,0x52D7,
0x52DE,0x52E3,0x52E6,0x98ED,0x52E0,0x52F3,0x52F5,0x52F8,
0x52F9,0x5306,0x5308,0x7538,0x530D,0x5310,0x530F,0x5315,
@@ -894,7 +894,7 @@ static uint16 tab_jisx0208_uni42[]={
0x54B8,0x54A5,0x54AC,0x54C4,0x54C8,0x54A8};
/* page 43 0x5321-0x537E */
-static uint16 tab_jisx0208_uni43[]={
+static const uint16 tab_jisx0208_uni43[]={
0x54AB,0x54C2,0x54A4,0x54BE,0x54BC,0x54D8,0x54E5,0x54E6,
0x550F,0x5514,0x54FD,0x54EE,0x54ED,0x54FA,0x54E2,0x5539,
0x5540,0x5563,0x554C,0x552E,0x555C,0x5545,0x5556,0x5557,
@@ -909,7 +909,7 @@ static uint16 tab_jisx0208_uni43[]={
0x56EE,0x56F9,0x5700,0x56FF,0x5704,0x5709};
/* page 44 0x5421-0x547E */
-static uint16 tab_jisx0208_uni44[]={
+static const uint16 tab_jisx0208_uni44[]={
0x5708,0x570B,0x570D,0x5713,0x5718,0x5716,0x55C7,0x571C,
0x5726,0x5737,0x5738,0x574E,0x573B,0x5740,0x574F,0x5769,
0x57C0,0x5788,0x5761,0x577F,0x5789,0x5793,0x57A0,0x57B3,
@@ -924,7 +924,7 @@ static uint16 tab_jisx0208_uni44[]={
0x5958,0x5962,0x5960,0x5967,0x596C,0x5969};
/* page 45 0x5521-0x557E */
-static uint16 tab_jisx0208_uni45[]={
+static const uint16 tab_jisx0208_uni45[]={
0x5978,0x5981,0x599D,0x4F5E,0x4FAB,0x59A3,0x59B2,0x59C6,
0x59E8,0x59DC,0x598D,0x59D9,0x59DA,0x5A25,0x5A1F,0x5A11,
0x5A1C,0x5A09,0x5A1A,0x5A40,0x5A6C,0x5A49,0x5A35,0x5A36,
@@ -939,7 +939,7 @@ static uint16 tab_jisx0208_uni45[]={
0x5C38,0x5C39,0x5C41,0x5C46,0x5C4E,0x5C53};
/* page 46 0x5621-0x567E */
-static uint16 tab_jisx0208_uni46[]={
+static const uint16 tab_jisx0208_uni46[]={
0x5C50,0x5C4F,0x5B71,0x5C6C,0x5C6E,0x4E62,0x5C76,0x5C79,
0x5C8C,0x5C91,0x5C94,0x599B,0x5CAB,0x5CBB,0x5CB6,0x5CBC,
0x5CB7,0x5CC5,0x5CBE,0x5CC7,0x5CD9,0x5CE9,0x5CFD,0x5CFA,
@@ -954,7 +954,7 @@ static uint16 tab_jisx0208_uni46[]={
0x5EA0,0x5EC1,0x5EC2,0x5EC8,0x5ED0,0x5ECF};
/* page 47 0x5721-0x577E */
-static uint16 tab_jisx0208_uni47[]={
+static const uint16 tab_jisx0208_uni47[]={
0x5ED6,0x5EE3,0x5EDD,0x5EDA,0x5EDB,0x5EE2,0x5EE1,0x5EE8,
0x5EE9,0x5EEC,0x5EF1,0x5EF3,0x5EF0,0x5EF4,0x5EF8,0x5EFE,
0x5F03,0x5F09,0x5F5D,0x5F5C,0x5F0B,0x5F11,0x5F16,0x5F29,
@@ -969,7 +969,7 @@ static uint16 tab_jisx0208_uni47[]={
0x6059,0x6081,0x608D,0x60E7,0x6083,0x609A};
/* page 48 0x5821-0x587E */
-static uint16 tab_jisx0208_uni48[]={
+static const uint16 tab_jisx0208_uni48[]={
0x6084,0x609B,0x6096,0x6097,0x6092,0x60A7,0x608B,0x60E1,
0x60B8,0x60E0,0x60D3,0x60B4,0x5FF0,0x60BD,0x60C6,0x60B5,
0x60D8,0x614D,0x6115,0x6106,0x60F6,0x60F7,0x6100,0x60F4,
@@ -984,7 +984,7 @@ static uint16 tab_jisx0208_uni48[]={
0x6208,0x6209,0x620D,0x620C,0x6214,0x621B};
/* page 49 0x5921-0x597E */
-static uint16 tab_jisx0208_uni49[]={
+static const uint16 tab_jisx0208_uni49[]={
0x621E,0x6221,0x622A,0x622E,0x6230,0x6232,0x6233,0x6241,
0x624E,0x625E,0x6263,0x625B,0x6260,0x6268,0x627C,0x6282,
0x6289,0x627E,0x6292,0x6293,0x6296,0x62D4,0x6283,0x6294,
@@ -999,7 +999,7 @@ static uint16 tab_jisx0208_uni49[]={
0x6495,0x6493,0x64A5,0x64A9,0x6488,0x64BC};
/* page 50 0x5A21-0x5A7E */
-static uint16 tab_jisx0208_uni50[]={
+static const uint16 tab_jisx0208_uni50[]={
0x64DA,0x64D2,0x64C5,0x64C7,0x64BB,0x64D8,0x64C2,0x64F1,
0x64E7,0x8209,0x64E0,0x64E1,0x62AC,0x64E3,0x64EF,0x652C,
0x64F6,0x64F4,0x64F2,0x64FA,0x6500,0x64FD,0x6518,0x651C,
@@ -1014,7 +1014,7 @@ static uint16 tab_jisx0208_uni50[]={
0x669D,0x66C1,0x66B9,0x66C9,0x66BE,0x66BC};
/* page 51 0x5B21-0x5B7E */
-static uint16 tab_jisx0208_uni51[]={
+static const uint16 tab_jisx0208_uni51[]={
0x66C4,0x66B8,0x66D6,0x66DA,0x66E0,0x663F,0x66E6,0x66E9,
0x66F0,0x66F5,0x66F7,0x670F,0x6716,0x671E,0x6726,0x6727,
0x9738,0x672E,0x673F,0x6736,0x6741,0x6738,0x6737,0x6746,
@@ -1029,7 +1029,7 @@ static uint16 tab_jisx0208_uni51[]={
0x68D8,0x6922,0x6926,0x68E1,0x690C,0x68CD};
/* page 52 0x5C21-0x5C7E */
-static uint16 tab_jisx0208_uni52[]={
+static const uint16 tab_jisx0208_uni52[]={
0x68D4,0x68E7,0x68D5,0x6936,0x6912,0x6904,0x68D7,0x68E3,
0x6925,0x68F9,0x68E0,0x68EF,0x6928,0x692A,0x691A,0x6923,
0x6921,0x68C6,0x6979,0x6977,0x695C,0x6978,0x696B,0x6954,
@@ -1044,7 +1044,7 @@ static uint16 tab_jisx0208_uni52[]={
0x6A90,0x6A8D,0x6AA0,0x6A84,0x6AA2,0x6AA3};
/* page 53 0x5D21-0x5D7E */
-static uint16 tab_jisx0208_uni53[]={
+static const uint16 tab_jisx0208_uni53[]={
0x6A97,0x8617,0x6ABB,0x6AC3,0x6AC2,0x6AB8,0x6AB3,0x6AAC,
0x6ADE,0x6AD1,0x6ADF,0x6AAA,0x6ADA,0x6AEA,0x6AFB,0x6B05,
0x8616,0x6AFA,0x6B12,0x6B16,0x9B31,0x6B1F,0x6B38,0x6B37,
@@ -1059,7 +1059,7 @@ static uint16 tab_jisx0208_uni53[]={
0x6CD7,0x6CC5,0x6CDD,0x6CAE,0x6CB1,0x6CBE};
/* page 54 0x5E21-0x5E7E */
-static uint16 tab_jisx0208_uni54[]={
+static const uint16 tab_jisx0208_uni54[]={
0x6CBA,0x6CDB,0x6CEF,0x6CD9,0x6CEA,0x6D1F,0x884D,0x6D36,
0x6D2B,0x6D3D,0x6D38,0x6D19,0x6D35,0x6D33,0x6D12,0x6D0C,
0x6D63,0x6D93,0x6D64,0x6D5A,0x6D79,0x6D59,0x6D8E,0x6D95,
@@ -1074,7 +1074,7 @@ static uint16 tab_jisx0208_uni54[]={
0x6F3F,0x6EF2,0x6F31,0x6EEF,0x6F32,0x6ECC};
/* page 55 0x5F21-0x5F7E */
-static uint16 tab_jisx0208_uni55[]={
+static const uint16 tab_jisx0208_uni55[]={
0x6F3E,0x6F13,0x6EF7,0x6F86,0x6F7A,0x6F78,0x6F81,0x6F80,
0x6F6F,0x6F5B,0x6FF3,0x6F6D,0x6F82,0x6F7C,0x6F58,0x6F8E,
0x6F91,0x6FC2,0x6F66,0x6FB3,0x6FA3,0x6FA1,0x6FA4,0x6FB9,
@@ -1089,7 +1089,7 @@ static uint16 tab_jisx0208_uni55[]={
0x71CE,0x71E0,0x71EC,0x71E7,0x71F5,0x71FC};
/* page 56 0x6021-0x607E */
-static uint16 tab_jisx0208_uni56[]={
+static const uint16 tab_jisx0208_uni56[]={
0x71F9,0x71FF,0x720D,0x7210,0x721B,0x7228,0x722D,0x722C,
0x7230,0x7232,0x723B,0x723C,0x723F,0x7240,0x7246,0x724B,
0x7258,0x7274,0x727E,0x7282,0x7281,0x7287,0x7292,0x7296,
@@ -1104,7 +1104,7 @@ static uint16 tab_jisx0208_uni56[]={
0x749E,0x74A7,0x74CA,0x74CF,0x74D4,0x73F1};
/* page 57 0x6121-0x617E */
-static uint16 tab_jisx0208_uni57[]={
+static const uint16 tab_jisx0208_uni57[]={
0x74E0,0x74E3,0x74E7,0x74E9,0x74EE,0x74F2,0x74F0,0x74F1,
0x74F8,0x74F7,0x7504,0x7503,0x7505,0x750C,0x750E,0x750D,
0x7515,0x7513,0x751E,0x7526,0x752C,0x753C,0x7544,0x754D,
@@ -1119,7 +1119,7 @@ static uint16 tab_jisx0208_uni57[]={
0x7668,0x7669,0x766A,0x7667,0x766C,0x7670};
/* page 58 0x6221-0x627E */
-static uint16 tab_jisx0208_uni58[]={
+static const uint16 tab_jisx0208_uni58[]={
0x7672,0x7676,0x7678,0x767C,0x7680,0x7683,0x7688,0x768B,
0x768E,0x7696,0x7693,0x7699,0x769A,0x76B0,0x76B4,0x76B8,
0x76B9,0x76BA,0x76C2,0x76CD,0x76D6,0x76D2,0x76DE,0x76E1,
@@ -1134,7 +1134,7 @@ static uint16 tab_jisx0208_uni58[]={
0x78D4,0x78BE,0x78BC,0x78C5,0x78CA,0x78EC};
/* page 59 0x6321-0x637E */
-static uint16 tab_jisx0208_uni59[]={
+static const uint16 tab_jisx0208_uni59[]={
0x78E7,0x78DA,0x78FD,0x78F4,0x7907,0x7912,0x7911,0x7919,
0x792C,0x792B,0x7940,0x7960,0x7957,0x795F,0x795A,0x7955,
0x7953,0x797A,0x797F,0x798A,0x799D,0x79A7,0x9F4B,0x79AA,
@@ -1149,7 +1149,7 @@ static uint16 tab_jisx0208_uni59[]={
0x7B19,0x7B1E,0x7B35,0x7B28,0x7B36,0x7B50};
/* page 60 0x6421-0x647E */
-static uint16 tab_jisx0208_uni60[]={
+static const uint16 tab_jisx0208_uni60[]={
0x7B7A,0x7B04,0x7B4D,0x7B0B,0x7B4C,0x7B45,0x7B75,0x7B65,
0x7B74,0x7B67,0x7B70,0x7B71,0x7B6C,0x7B6E,0x7B9D,0x7B98,
0x7B9F,0x7B8D,0x7B9C,0x7B9A,0x7B8B,0x7B92,0x7B8F,0x7B5D,
@@ -1164,7 +1164,7 @@ static uint16 tab_jisx0208_uni60[]={
0x7CEF,0x7CF2,0x7CF4,0x7CF6,0x7CFA,0x7D06};
/* page 61 0x6521-0x657E */
-static uint16 tab_jisx0208_uni61[]={
+static const uint16 tab_jisx0208_uni61[]={
0x7D02,0x7D1C,0x7D15,0x7D0A,0x7D45,0x7D4B,0x7D2E,0x7D32,
0x7D3F,0x7D35,0x7D46,0x7D73,0x7D56,0x7D4E,0x7D72,0x7D68,
0x7D6E,0x7D4F,0x7D63,0x7D93,0x7D89,0x7D5B,0x7D8F,0x7D7D,
@@ -1179,7 +1179,7 @@ static uint16 tab_jisx0208_uni61[]={
0x7E96,0x7E8E,0x7E9B,0x7E9C,0x7F38,0x7F3A};
/* page 62 0x6621-0x667E */
-static uint16 tab_jisx0208_uni62[]={
+static const uint16 tab_jisx0208_uni62[]={
0x7F45,0x7F4C,0x7F4D,0x7F4E,0x7F50,0x7F51,0x7F55,0x7F54,
0x7F58,0x7F5F,0x7F60,0x7F68,0x7F69,0x7F67,0x7F78,0x7F82,
0x7F86,0x7F83,0x7F88,0x7F87,0x7F8C,0x7F94,0x7F9E,0x7F9D,
@@ -1194,7 +1194,7 @@ static uint16 tab_jisx0208_uni62[]={
0x80F1,0x811B,0x8129,0x8123,0x812F,0x814B};
/* page 63 0x6721-0x677E */
-static uint16 tab_jisx0208_uni63[]={
+static const uint16 tab_jisx0208_uni63[]={
0x968B,0x8146,0x813E,0x8153,0x8151,0x80FC,0x8171,0x816E,
0x8165,0x8166,0x8174,0x8183,0x8188,0x818A,0x8180,0x8182,
0x81A0,0x8195,0x81A4,0x81A3,0x815F,0x8193,0x81A9,0x81B0,
@@ -1209,7 +1209,7 @@ static uint16 tab_jisx0208_uni63[]={
0x82F9,0x82DE,0x8306,0x82DC,0x8309,0x82D9};
/* page 64 0x6821-0x687E */
-static uint16 tab_jisx0208_uni64[]={
+static const uint16 tab_jisx0208_uni64[]={
0x8335,0x8334,0x8316,0x8332,0x8331,0x8340,0x8339,0x8350,
0x8345,0x832F,0x832B,0x8317,0x8318,0x8385,0x839A,0x83AA,
0x839F,0x83A2,0x8396,0x8323,0x838E,0x8387,0x838A,0x837C,
@@ -1224,7 +1224,7 @@ static uint16 tab_jisx0208_uni64[]={
0x8514,0x84FC,0x8540,0x8563,0x8558,0x8548};
/* page 65 0x6921-0x697E */
-static uint16 tab_jisx0208_uni65[]={
+static const uint16 tab_jisx0208_uni65[]={
0x8541,0x8602,0x854B,0x8555,0x8580,0x85A4,0x8588,0x8591,
0x858A,0x85A8,0x856D,0x8594,0x859B,0x85EA,0x8587,0x859C,
0x8577,0x857E,0x8590,0x85C9,0x85BA,0x85CF,0x85B9,0x85D0,
@@ -1239,7 +1239,7 @@ static uint16 tab_jisx0208_uni65[]={
0x874E,0x8774,0x8757,0x8768,0x876E,0x8759};
/* page 66 0x6A21-0x6A7E */
-static uint16 tab_jisx0208_uni66[]={
+static const uint16 tab_jisx0208_uni66[]={
0x8753,0x8763,0x876A,0x8805,0x87A2,0x879F,0x8782,0x87AF,
0x87CB,0x87BD,0x87C0,0x87D0,0x96D6,0x87AB,0x87C4,0x87B3,
0x87C7,0x87C6,0x87BB,0x87EF,0x87F2,0x87E0,0x880F,0x880D,
@@ -1254,7 +1254,7 @@ static uint16 tab_jisx0208_uni66[]={
0x8936,0x8938,0x894C,0x891D,0x8960,0x895E};
/* page 67 0x6B21-0x6B7E */
-static uint16 tab_jisx0208_uni67[]={
+static const uint16 tab_jisx0208_uni67[]={
0x8966,0x8964,0x896D,0x896A,0x896F,0x8974,0x8977,0x897E,
0x8983,0x8988,0x898A,0x8993,0x8998,0x89A1,0x89A9,0x89A6,
0x89AC,0x89AF,0x89B2,0x89BA,0x89BD,0x89BF,0x89C0,0x89DA,
@@ -1269,7 +1269,7 @@ static uint16 tab_jisx0208_uni67[]={
0x8B4E,0x8B49,0x8B56,0x8B5B,0x8B5A,0x8B6B};
/* page 68 0x6C21-0x6C7E */
-static uint16 tab_jisx0208_uni68[]={
+static const uint16 tab_jisx0208_uni68[]={
0x8B5F,0x8B6C,0x8B6F,0x8B74,0x8B7D,0x8B80,0x8B8C,0x8B8E,
0x8B92,0x8B93,0x8B96,0x8B99,0x8B9A,0x8C3A,0x8C41,0x8C3F,
0x8C48,0x8C4C,0x8C4E,0x8C50,0x8C55,0x8C62,0x8C6C,0x8C78,
@@ -1284,7 +1284,7 @@ static uint16 tab_jisx0208_uni68[]={
0x8E1F,0x8E42,0x8E35,0x8E30,0x8E34,0x8E4A};
/* page 69 0x6D21-0x6D7E */
-static uint16 tab_jisx0208_uni69[]={
+static const uint16 tab_jisx0208_uni69[]={
0x8E47,0x8E49,0x8E4C,0x8E50,0x8E48,0x8E59,0x8E64,0x8E60,
0x8E2A,0x8E63,0x8E55,0x8E76,0x8E72,0x8E7C,0x8E81,0x8E87,
0x8E85,0x8E84,0x8E8B,0x8E8A,0x8E93,0x8E91,0x8E94,0x8E99,
@@ -1299,7 +1299,7 @@ static uint16 tab_jisx0208_uni69[]={
0x900B,0x9027,0x9036,0x9035,0x9039,0x8FF8};
/* page 70 0x6E21-0x6E7E */
-static uint16 tab_jisx0208_uni70[]={
+static const uint16 tab_jisx0208_uni70[]={
0x904F,0x9050,0x9051,0x9052,0x900E,0x9049,0x903E,0x9056,
0x9058,0x905E,0x9068,0x906F,0x9076,0x96A8,0x9072,0x9082,
0x907D,0x9081,0x9080,0x908A,0x9089,0x908F,0x90A8,0x90AF,
@@ -1314,7 +1314,7 @@ static uint16 tab_jisx0208_uni70[]={
0x92B7,0x92E9,0x930F,0x92FA,0x9344,0x932E};
/* page 71 0x6F21-0x6F7E */
-static uint16 tab_jisx0208_uni71[]={
+static const uint16 tab_jisx0208_uni71[]={
0x9319,0x9322,0x931A,0x9323,0x933A,0x9335,0x933B,0x935C,
0x9360,0x937C,0x936E,0x9356,0x93B0,0x93AC,0x93AD,0x9394,
0x93B9,0x93D6,0x93D7,0x93E8,0x93E5,0x93D8,0x93C3,0x93DD,
@@ -1329,7 +1329,7 @@ static uint16 tab_jisx0208_uni71[]={
0x964C,0x964F,0x964B,0x9677,0x965C,0x965E};
/* page 72 0x7021-0x707E */
-static uint16 tab_jisx0208_uni72[]={
+static const uint16 tab_jisx0208_uni72[]={
0x965D,0x965F,0x9666,0x9672,0x966C,0x968D,0x9698,0x9695,
0x9697,0x96AA,0x96A7,0x96B1,0x96B2,0x96B0,0x96B4,0x96B6,
0x96B8,0x96B9,0x96CE,0x96CB,0x96C9,0x96CD,0x894D,0x96DC,
@@ -1344,7 +1344,7 @@ static uint16 tab_jisx0208_uni72[]={
0x9846,0x984F,0x984B,0x986B,0x986F,0x9870};
/* page 73 0x7121-0x717E */
-static uint16 tab_jisx0208_uni73[]={
+static const uint16 tab_jisx0208_uni73[]={
0x9871,0x9874,0x9873,0x98AA,0x98AF,0x98B1,0x98B6,0x98C4,
0x98C3,0x98C6,0x98E9,0x98EB,0x9903,0x9909,0x9912,0x9914,
0x9918,0x9921,0x991D,0x991E,0x9924,0x9920,0x992C,0x992E,
@@ -1359,7 +1359,7 @@ static uint16 tab_jisx0208_uni73[]={
0x9AEF,0x9AEB,0x9AEE,0x9AF4,0x9AF1,0x9AF7};
/* page 74 0x7221-0x727E */
-static uint16 tab_jisx0208_uni74[]={
+static const uint16 tab_jisx0208_uni74[]={
0x9AFB,0x9B06,0x9B18,0x9B1A,0x9B1F,0x9B22,0x9B23,0x9B25,
0x9B27,0x9B28,0x9B29,0x9B2A,0x9B2E,0x9B2F,0x9B32,0x9B44,
0x9B43,0x9B4F,0x9B4D,0x9B4E,0x9B51,0x9B58,0x9B74,0x9B93,
@@ -1374,7 +1374,7 @@ static uint16 tab_jisx0208_uni74[]={
0x9D12,0x9D41,0x9D3F,0x9D3E,0x9D46,0x9D48};
/* page 75 0x7321-0x737E */
-static uint16 tab_jisx0208_uni75[]={
+static const uint16 tab_jisx0208_uni75[]={
0x9D5D,0x9D5E,0x9D64,0x9D51,0x9D50,0x9D59,0x9D72,0x9D89,
0x9D87,0x9DAB,0x9D6F,0x9D7A,0x9D9A,0x9DA4,0x9DA9,0x9DB2,
0x9DC4,0x9DC1,0x9DBB,0x9DB8,0x9DBA,0x9DC6,0x9DCF,0x9DC2,
@@ -1389,11 +1389,11 @@ static uint16 tab_jisx0208_uni75[]={
0x9F77,0x9F72,0x9F76,0x9F95,0x9F9C,0x9FA0};
/* page 76 0x7421-0x7426 */
-static uint16 tab_jisx0208_uni76[]={
+static const uint16 tab_jisx0208_uni76[]={
0x582F,0x69C7,0x9059,0x7464,0x51DC,0x7199};
/* page 77 0x2D21 - 0x2D7C */
-static uint16 tab_nec13_uni0[]={
+static const uint16 tab_nec13_uni0[]={
0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,
0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,
0x2470,0x2471,0x2472,0x2473,0x2160,0x2161,0x2162,0x2163,
@@ -1569,25 +1569,25 @@ my_jisx0208_uni_onechar(int code){
}
/* page 0 0x005C-0x005C */
-static uint16 tab_uni_jisx02080[]={
+static const uint16 tab_uni_jisx02080[]={
0x5C};
/* page 1 0x00A2-0x00B6 */
-static uint16 tab_uni_jisx02081[]={
+static const uint16 tab_uni_jisx02081[]={
0, 0, 0, 0, 0,0x2178,0x212F, 0,
0, 0, 0, 0, 0, 0,0x216B,0x215E,
0, 0,0x212D, 0,0x2279};
/* page 2 0x00D7-0x00D7 */
-static uint16 tab_uni_jisx02082[]={
+static const uint16 tab_uni_jisx02082[]={
0x215F};
/* page 3 0x00F7-0x00F7 */
-static uint16 tab_uni_jisx02083[]={
+static const uint16 tab_uni_jisx02083[]={
0x2160};
/* page 4 0x0391-0x03C9 */
-static uint16 tab_uni_jisx02084[]={
+static const uint16 tab_uni_jisx02084[]={
0x2621,0x2622,0x2623,0x2624,0x2625,0x2626,0x2627,0x2628,
0x2629,0x262A,0x262B,0x262C,0x262D,0x262E,0x262F,0x2630,
0x2631, 0,0x2632,0x2633,0x2634,0x2635,0x2636,0x2637,
@@ -1598,7 +1598,7 @@ static uint16 tab_uni_jisx02084[]={
0x2658};
/* page 5 0x0401-0x0451 */
-static uint16 tab_uni_jisx02085[]={
+static const uint16 tab_uni_jisx02085[]={
0x2727, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,0x2721,
0x2722,0x2723,0x2724,0x2725,0x2726,0x2728,0x2729,0x272A,
@@ -1612,7 +1612,7 @@ static uint16 tab_uni_jisx02085[]={
0x2757};
/* page 6 0x2010-0x203B */
-static uint16 tab_uni_jisx02086[]={
+static const uint16 tab_uni_jisx02086[]={
0x213E, 0, 0, 0, 0,0x213D, 0, 0,
0x2146,0x2147, 0, 0,0x2148,0x2149, 0, 0,
0x2277,0x2278, 0, 0, 0,0x2145,0x2144, 0,
@@ -1621,31 +1621,31 @@ static uint16 tab_uni_jisx02086[]={
0, 0, 0,0x2228};
/* page 7 0x2100-0x2116 */
-static uint16 tab_uni_jisx02087[]={
+static const uint16 tab_uni_jisx02087[]={
0, 0, 0,0x216E, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x2D62};
/* page 8 0x2120-0x212B */
-static uint16 tab_uni_jisx02088[]={
+static const uint16 tab_uni_jisx02088[]={
0,0x2D64, 0, 0, 0, 0, 0, 0,
0, 0, 0,0x2272};
/* page 9 0x2160-0x2169 */
-static uint16 tab_uni_jisx02089[]={
+static const uint16 tab_uni_jisx02089[]={
0x2D35,0x2D36,0x2D37,0x2D38,0x2D39,0x2D3A,0x2D3B,0x2D3C,
0x2D3D,0x2D3E};
/* page 10 0x2190-0x2193 */
-static uint16 tab_uni_jisx020810[]={
+static const uint16 tab_uni_jisx020810[]={
0x222B,0x222C,0x222A,0x222D};
/* page 11 0x21D2-0x21D4 */
-static uint16 tab_uni_jisx020811[]={
+static const uint16 tab_uni_jisx020811[]={
0x224D, 0,0x224E};
/* page 12 0x2200-0x223D */
-static uint16 tab_uni_jisx020812[]={
+static const uint16 tab_uni_jisx020812[]={
0x224F, 0,0x225F,0x2250, 0, 0, 0,0x2260,
0x223A, 0, 0,0x223B, 0, 0, 0, 0,
0,0x2D74, 0, 0, 0, 0, 0, 0,
@@ -1656,35 +1656,35 @@ static uint16 tab_uni_jisx020812[]={
0, 0, 0, 0, 0,0x2266};
/* page 13 0x2252-0x226B */
-static uint16 tab_uni_jisx020813[]={
+static const uint16 tab_uni_jisx020813[]={
0x2262, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x2162,0x2261,
0, 0, 0, 0,0x2165,0x2166, 0, 0,
0x2263,0x2264};
/* page 14 0x2282-0x2287 */
-static uint16 tab_uni_jisx020814[]={
+static const uint16 tab_uni_jisx020814[]={
0x223E,0x223F, 0, 0,0x223C,0x223D};
/* page 15 0x22A0-0x22BF */
-static uint16 tab_uni_jisx020815[]={
+static const uint16 tab_uni_jisx020815[]={
0, 0, 0, 0, 0,0x225D, 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,0x2D79};
/* page 16 0x2312-0x2312 */
-static uint16 tab_uni_jisx020816[]={
+static const uint16 tab_uni_jisx020816[]={
0x225E};
/* page 17 0x2460-0x2473 */
-static uint16 tab_uni_jisx020817[]={
+static const uint16 tab_uni_jisx020817[]={
0x2D21,0x2D22,0x2D23,0x2D24,0x2D25,0x2D26,0x2D27,0x2D28,
0x2D29,0x2D2A,0x2D2B,0x2D2C,0x2D2D,0x2D2E,0x2D2F,0x2D30,
0x2D31,0x2D32,0x2D33,0x2D34};
/* page 18 0x2500-0x254B */
-static uint16 tab_uni_jisx020818[]={
+static const uint16 tab_uni_jisx020818[]={
0x2821,0x282C,0x2822,0x282D, 0, 0, 0, 0,
0, 0, 0, 0,0x2823, 0, 0,0x282E,
0x2824, 0, 0,0x282F,0x2826, 0, 0,0x2831,
@@ -1697,7 +1697,7 @@ static uint16 tab_uni_jisx020818[]={
0, 0, 0,0x2836};
/* page 19 0x25A0-0x25CF */
-static uint16 tab_uni_jisx020819[]={
+static const uint16 tab_uni_jisx020819[]={
0x2223,0x2222, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0,0x2225,0x2224, 0, 0, 0, 0,
@@ -1707,30 +1707,30 @@ static uint16 tab_uni_jisx020819[]={
};
/* page 20 0x25EF-0x25EF */
-static uint16 tab_uni_jisx020820[]={
+static const uint16 tab_uni_jisx020820[]={
0x227E};
/* page 21 0x2605-0x2606 */
-static uint16 tab_uni_jisx020821[]={
+static const uint16 tab_uni_jisx020821[]={
0x217A,0x2179};
/* page 22 0x2640-0x2642 */
-static uint16 tab_uni_jisx020822[]={
+static const uint16 tab_uni_jisx020822[]={
0x216A, 0,0x2169};
/* page 23 0x266A-0x266F */
-static uint16 tab_uni_jisx020823[]={
+static const uint16 tab_uni_jisx020823[]={
0x2276, 0, 0,0x2275, 0,0x2274};
/* page 24 0x3000-0x301F */
-static uint16 tab_uni_jisx020824[]={
+static const uint16 tab_uni_jisx020824[]={
0x2121,0x2122,0x2123,0x2137, 0,0x2139,0x213A,0x213B,
0x2152,0x2153,0x2154,0x2155,0x2156,0x2157,0x2158,0x2159,
0x215A,0x215B,0x2229,0x222E,0x214C,0x214D, 0, 0,
0, 0, 0, 0, 0,0x2D60, 0,0x2D61};
/* page 25 0x3041-0x30FE */
-static uint16 tab_uni_jisx020825[]={
+static const uint16 tab_uni_jisx020825[]={
0x2421,0x2422,0x2423,0x2424,0x2425,0x2426,0x2427,0x2428,
0x2429,0x242A,0x242B,0x242C,0x242D,0x242E,0x242F,0x2430,
0x2431,0x2432,0x2433,0x2434,0x2435,0x2436,0x2437,0x2438,
@@ -1757,17 +1757,17 @@ static uint16 tab_uni_jisx020825[]={
0, 0,0x2126,0x213C,0x2133,0x2134};
/* page 26 0x3230-0x3239 */
-static uint16 tab_uni_jisx020826[]={
+static const uint16 tab_uni_jisx020826[]={
0,0x2D6A,0x2D6B, 0, 0, 0, 0, 0,
0,0x2D6C};
/* page 27 0x32A0-0x32A8 */
-static uint16 tab_uni_jisx020827[]={
+static const uint16 tab_uni_jisx020827[]={
0, 0, 0, 0,0x2D65,0x2D66,0x2D67,0x2D68,
0x2D69};
/* page 28 0x3300-0x33CD */
-static uint16 tab_uni_jisx020828[]={
+static const uint16 tab_uni_jisx020828[]={
0, 0, 0,0x2D46, 0, 0, 0, 0,
0, 0, 0, 0, 0,0x2D4A, 0, 0,
0, 0, 0, 0,0x2D41, 0, 0, 0,
@@ -1796,7 +1796,7 @@ static uint16 tab_uni_jisx020828[]={
0, 0, 0, 0, 0,0x2D63};
/* page 29 0x4E00-0x5516 */
-static uint16 tab_uni_jisx020829[]={
+static const uint16 tab_uni_jisx020829[]={
0x306C,0x437A, 0,0x3C37, 0, 0, 0,0x4B7C,
0x3E66,0x3B30,0x3E65,0x323C, 0,0x4954,0x4D3F, 0,
0x5022,0x312F, 0, 0,0x336E,0x5023,0x4024,0x5242,
@@ -2026,7 +2026,7 @@ static uint16 tab_uni_jisx020829[]={
0x4562, 0, 0, 0,0x532A, 0,0x3022};
/* page 30 0x552E-0x5563 */
-static uint16 tab_uni_jisx020830[]={
+static const uint16 tab_uni_jisx020830[]={
0x5334,0x4D23, 0,0x3E27, 0,0x533A, 0, 0,
0, 0,0x5339,0x5330, 0, 0, 0, 0,
0x4243, 0,0x5331, 0, 0, 0,0x426F,0x5336,
@@ -2036,7 +2036,7 @@ static uint16 tab_uni_jisx020830[]={
0, 0, 0, 0, 0,0x5332};
/* page 31 0x557B-0x576A */
-static uint16 tab_uni_jisx020831[]={
+static const uint16 tab_uni_jisx020831[]={
0x5341,0x5346, 0,0x5342, 0,0x533D, 0, 0,
0x5347,0x4131, 0, 0,0x5349, 0,0x3922,0x533F,
0x437D, 0, 0, 0, 0, 0, 0, 0,
@@ -2102,7 +2102,7 @@ static uint16 tab_uni_jisx020831[]={
};
/* page 32 0x577F-0x5A9B */
-static uint16 tab_uni_jisx020832[]={
+static const uint16 tab_uni_jisx020832[]={
0x5434, 0, 0,0x3F62, 0, 0, 0, 0,
0,0x5432,0x5435, 0,0x373F, 0, 0, 0,
0, 0, 0, 0,0x5436, 0, 0, 0,
@@ -2205,7 +2205,7 @@ static uint16 tab_uni_jisx020832[]={
0, 0, 0,0x553B,0x4932};
/* page 33 0x5ABC-0x5D29 */
-static uint16 tab_uni_jisx020833[]={
+static const uint16 tab_uni_jisx020833[]={
0x553C,0x5540,0x553D, 0, 0,0x3247,0x553F, 0,
0, 0, 0, 0, 0,0x3C3B, 0,0x553E,
0x3779, 0, 0, 0,0x554C, 0, 0, 0,
@@ -2286,7 +2286,7 @@ static uint16 tab_uni_jisx020833[]={
0, 0, 0, 0, 0,0x4A78};
/* page 34 0x5D4B-0x6BF3 */
-static uint16 tab_uni_jisx020834[]={
+static const uint16 tab_uni_jisx020834[]={
0x564B,0x5648, 0,0x564A, 0,0x4D72, 0,0x5649,
0, 0, 0, 0, 0, 0, 0, 0,
0,0x563F, 0, 0, 0, 0, 0, 0,
@@ -2759,7 +2759,7 @@ static uint16 tab_uni_jisx020834[]={
0x5D5E};
/* page 35 0x6C08-0x6CF3 */
-static uint16 tab_uni_jisx020835[]={
+static const uint16 tab_uni_jisx020835[]={
0x5D61, 0, 0, 0, 0, 0, 0,0x3B61,
0,0x4C31, 0,0x5D62,0x5D63, 0, 0,0x3524,
0, 0, 0,0x5D64, 0, 0, 0, 0,
@@ -2792,7 +2792,7 @@ static uint16 tab_uni_jisx020835[]={
0x4259,0x5D76, 0,0x314B};
/* page 36 0x6D0B-0x7409 */
-static uint16 tab_uni_jisx020836[]={
+static const uint16 tab_uni_jisx020836[]={
0x4D4E,0x5E30, 0, 0, 0, 0, 0,0x5E2F,
0, 0, 0, 0,0x4076, 0,0x5E2C, 0,
0x4D6C, 0, 0,0x4636,0x5E26, 0, 0, 0,
@@ -3019,7 +3019,7 @@ static uint16 tab_uni_jisx020836[]={
0x3565, 0,0x6066,0x4D7D, 0, 0,0x4E30};
/* page 37 0x7422-0x7845 */
-static uint16 tab_uni_jisx020837[]={
+static const uint16 tab_uni_jisx020837[]={
0x4276, 0, 0,0x6068, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0x606A,0x4E56,0x3657,0x487C,0x474A, 0, 0, 0,
@@ -3155,7 +3155,7 @@ static uint16 tab_uni_jisx020837[]={
0, 0, 0,0x626B};
/* page 38 0x785D-0x7E9C */
-static uint16 tab_uni_jisx020838[]={
+static const uint16 tab_uni_jisx020838[]={
0x3E4B, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x4E32,0x3945,
0, 0,0x3827, 0, 0,0x4823, 0,0x626D,
@@ -3359,7 +3359,7 @@ static uint16 tab_uni_jisx020838[]={
};
/* page 39 0x7F36-0x8358 */
-static uint16 tab_uni_jisx020839[]={
+static const uint16 tab_uni_jisx020839[]={
0x344C, 0,0x657D, 0,0x657E, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,0x6621,
0, 0, 0, 0, 0, 0,0x6622,0x6623,
@@ -3495,7 +3495,7 @@ static uint16 tab_uni_jisx020839[]={
0, 0,0x4171};
/* page 40 0x8373-0x8B9A */
-static uint16 tab_uni_jisx020840[]={
+static const uint16 tab_uni_jisx020840[]={
0x683A, 0,0x683B, 0,0x3259, 0, 0, 0,
0x322E,0x6838, 0, 0, 0, 0, 0, 0,
0, 0,0x682E, 0,0x6836, 0,0x683D,0x6837,
@@ -3760,7 +3760,7 @@ static uint16 tab_uni_jisx020840[]={
};
/* page 41 0x8C37-0x8D16 */
-static uint16 tab_uni_jisx020841[]={
+static const uint16 tab_uni_jisx020841[]={
0x432B, 0, 0,0x6C2E, 0, 0, 0, 0,
0x6C30, 0,0x6C2F, 0, 0, 0, 0,0x4626,
0,0x6C31, 0,0x4B2D, 0,0x6C32, 0,0x6C33,
@@ -3792,7 +3792,7 @@ static uint16 tab_uni_jisx020841[]={
};
/* page 42 0x8D64-0x8F64 */
-static uint16 tab_uni_jisx020842[]={
+static const uint16 tab_uni_jisx020842[]={
0x4056, 0,0x3C4F,0x6C5F, 0, 0, 0,0x3352,
0,0x6C60, 0, 0,0x4176,0x6C61, 0,0x6C62,
0x496B, 0, 0,0x352F, 0, 0, 0, 0,
@@ -3860,7 +3860,7 @@ static uint16 tab_uni_jisx020842[]={
0x6D62};
/* page 43 0x8F9B-0x9132 */
-static uint16 tab_uni_jisx020843[]={
+static const uint16 tab_uni_jisx020843[]={
0x3F49,0x6D63, 0,0x3C2D,0x6D64, 0, 0, 0,
0x6D65, 0, 0, 0,0x5221,0x517E, 0, 0,
0, 0,0x6D66,0x6570,0x6D67,0x4324,0x3F2B,0x4740,
@@ -3915,7 +3915,7 @@ static uint16 tab_uni_jisx020843[]={
};
/* page 44 0x9149-0x92B9 */
-static uint16 tab_uni_jisx020844[]={
+static const uint16 tab_uni_jisx020844[]={
0x4653,0x6E44,0x3D36,0x3C60,0x475B,0x4371, 0, 0,
0,0x3C72, 0,0x3F6C, 0,0x6E45, 0,0x6E46,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -3965,7 +3965,7 @@ static uint16 tab_uni_jisx020844[]={
0x6E78};
/* page 45 0x92CF-0x93E8 */
-static uint16 tab_uni_jisx020845[]={
+static const uint16 tab_uni_jisx020845[]={
0x6E77, 0, 0,0x4B2F, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,0x3D7B, 0, 0,
@@ -4004,7 +4004,7 @@ static uint16 tab_uni_jisx020845[]={
0,0x6F34};
/* page 46 0x9403-0x9481 */
-static uint16 tab_uni_jisx020846[]={
+static const uint16 tab_uni_jisx020846[]={
0x6F3F, 0, 0, 0,0x6F40, 0, 0, 0,
0, 0, 0, 0, 0,0x6F41, 0, 0,
0x6F3E,0x6F3D, 0, 0, 0,0x3E62,0x462A,0x6F3C,
@@ -4023,7 +4023,7 @@ static uint16 tab_uni_jisx020846[]={
0,0x6F55,0x6F53,0x6F56,0x6F58, 0,0x6F57};
/* page 47 0x9577-0x95E5 */
-static uint16 tab_uni_jisx020847[]={
+static const uint16 tab_uni_jisx020847[]={
0x4439, 0, 0, 0, 0, 0, 0, 0,
0,0x4C67, 0,0x6F59,0x412E, 0, 0, 0,
0x6F5A, 0,0x4A44,0x6F5B,0x332B, 0, 0, 0,
@@ -4040,7 +4040,7 @@ static uint16 tab_uni_jisx020847[]={
0, 0,0x6F71,0x6F73, 0, 0,0x6F72};
/* page 48 0x961C-0x9874 */
-static uint16 tab_uni_jisx020848[]={
+static const uint16 tab_uni_jisx020848[]={
0x496C, 0, 0, 0, 0,0x6F74, 0, 0,
0, 0, 0, 0,0x6F75, 0,0x3A65, 0,
0, 0,0x6F76,0x6F77, 0, 0,0x4B49, 0,
@@ -4119,14 +4119,14 @@ static uint16 tab_uni_jisx020848[]={
0x7122};
/* page 49 0x98A8-0x98C6 */
-static uint16 tab_uni_jisx020849[]={
+static const uint16 tab_uni_jisx020849[]={
0x4977, 0,0x7124, 0, 0, 0, 0,0x7125,
0,0x7126, 0, 0, 0, 0,0x7127, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,0x7129,0x7128, 0,0x712A};
/* page 50 0x98DB-0x9957 */
-static uint16 tab_uni_jisx020850[]={
+static const uint16 tab_uni_jisx020850[]={
0x4874,0x664C, 0, 0,0x3F29, 0, 0,0x3532,
0, 0, 0, 0, 0, 0,0x712B, 0,
0x712C, 0,0x522C,0x5D3B,0x4853, 0, 0,0x307B,
@@ -4145,7 +4145,7 @@ static uint16 tab_uni_jisx020850[]={
0, 0,0x7143, 0,0x3642};
/* page 51 0x9996-0x9A6B */
-static uint16 tab_uni_jisx020851[]={
+static const uint16 tab_uni_jisx020851[]={
0x3C73,0x7144,0x7145,0x3961, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,0x7146,
0, 0,0x333E, 0, 0, 0,0x474F,0x7147,
@@ -4175,7 +4175,7 @@ static uint16 tab_uni_jisx020851[]={
0, 0, 0,0x7169,0x716B,0x716A};
/* page 52 0x9AA8-0x9B5A */
-static uint16 tab_uni_jisx020852[]={
+static const uint16 tab_uni_jisx020852[]={
0x397C, 0, 0, 0, 0,0x716C, 0, 0,
0x716D, 0, 0, 0, 0, 0, 0, 0,
0x333C, 0, 0, 0,0x716E, 0, 0, 0,
@@ -4201,7 +4201,7 @@ static uint16 tab_uni_jisx020852[]={
0x7236, 0,0x357B};
/* page 53 0x9B6F-0x9C78 */
-static uint16 tab_uni_jisx020853[]={
+static const uint16 tab_uni_jisx020853[]={
0x4F25, 0, 0, 0, 0,0x7237, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0x7239, 0, 0, 0,
@@ -4238,7 +4238,7 @@ static uint16 tab_uni_jisx020853[]={
0,0x7269};
/* page 54 0x9CE5-0x9DFD */
-static uint16 tab_uni_jisx020854[]={
+static const uint16 tab_uni_jisx020854[]={
0x443B, 0,0x726A, 0,0x4837, 0,0x726F,0x726B,
0, 0, 0,0x726C, 0, 0,0x4B31,0x4C44,
0,0x4650, 0, 0, 0, 0, 0, 0,
@@ -4277,11 +4277,11 @@ static uint16 tab_uni_jisx020854[]={
0x733F};
/* page 55 0x9E1A-0x9E1E */
-static uint16 tab_uni_jisx020855[]={
+static const uint16 tab_uni_jisx020855[]={
0x7340,0x7341, 0, 0,0x7342};
/* page 56 0x9E75-0x9F77 */
-static uint16 tab_uni_jisx020856[]={
+static const uint16 tab_uni_jisx020856[]={
0x7343, 0, 0,0x3834,0x7344, 0, 0, 0,
0x7345, 0,0x3C2F, 0,0x7346, 0, 0, 0,
0, 0, 0,0x7347, 0, 0,0x7348,0x7349,
@@ -4317,13 +4317,13 @@ static uint16 tab_uni_jisx020856[]={
0,0x737B,0x7379};
/* page 57 0x9F8D-0x9FA0 */
-static uint16 tab_uni_jisx020857[]={
+static const uint16 tab_uni_jisx020857[]={
0x4E36, 0, 0, 0, 0, 0, 0, 0,
0x737C, 0, 0, 0, 0, 0, 0,0x737D,
0x6354, 0, 0,0x737E};
/* page 58 0xFF01-0xFF5E */
-static uint16 tab_uni_jisx020858[]={
+static const uint16 tab_uni_jisx020858[]={
0x212A, 0,0x2174,0x2170,0x2173,0x2175, 0,0x214A,
0x214B,0x2176,0x215C,0x2124,0x215D,0x2125,0x213F,0x2330,
0x2331,0x2332,0x2333,0x2334,0x2335,0x2336,0x2337,0x2338,
@@ -4338,7 +4338,7 @@ static uint16 tab_uni_jisx020858[]={
0x2379,0x237A,0x2150,0x2143,0x2151,0x2141};
/* page 59 0xFFE0-0xFFE5 */
-static uint16 tab_uni_jisx020859[]={
+static const uint16 tab_uni_jisx020859[]={
0x2171,0x2172,0x224C,0x2131, 0,0x216F};
static int
@@ -4468,11 +4468,11 @@ my_uni_jisx0208_onechar(int code){
/* page 0 0x007E-0x007E */
-static uint16 tab_uni_jisx02120[]={
+static const uint16 tab_uni_jisx02120[]={
0};
/* page 1 0x00A1-0x017E */
-static uint16 tab_uni_jisx02121[]={
+static const uint16 tab_uni_jisx02121[]={
0x2242, 0, 0,0x2270, 0, 0, 0, 0,
0x226D,0x226C, 0, 0, 0,0x226E,0x2234, 0,
0, 0, 0, 0, 0, 0, 0,0x2231,
@@ -4503,28 +4503,28 @@ static uint16 tab_uni_jisx02121[]={
0x2A75,0x2B75,0x2A77,0x2B77,0x2A76,0x2B76};
/* page 2 0x01CD-0x01DC */
-static uint16 tab_uni_jisx02122[]={
+static const uint16 tab_uni_jisx02122[]={
0x2A26,0x2B26,0x2A43,0x2B43,0x2A55,0x2B55,0x2A67,0x2B67,
0x2A70,0x2B70,0x2A6D,0x2B6D,0x2A6F,0x2B6F,0x2A6E,0x2B6E
};
/* page 3 0x01F5-0x01F5 */
-static uint16 tab_uni_jisx02123[]={
+static const uint16 tab_uni_jisx02123[]={
0x2B39};
/* page 4 0x02C7-0x02DD */
-static uint16 tab_uni_jisx02124[]={
+static const uint16 tab_uni_jisx02124[]={
0x2230, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0,0x222F,0x2232,0x2236,0x2235, 0,0x2233};
/* page 5 0x0384-0x0390 */
-static uint16 tab_uni_jisx02125[]={
+static const uint16 tab_uni_jisx02125[]={
0x2238,0x2239,0x2661, 0,0x2662,0x2663,0x2664, 0,
0x2667, 0,0x2669,0x266C,0x2676};
/* page 6 0x03AA-0x03CE */
-static uint16 tab_uni_jisx02126[]={
+static const uint16 tab_uni_jisx02126[]={
0x2665,0x266A,0x2671,0x2672,0x2673,0x2674,0x267B, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -4532,26 +4532,26 @@ static uint16 tab_uni_jisx02126[]={
0x2675,0x267A,0x2677,0x2679,0x267C};
/* page 7 0x0402-0x040F */
-static uint16 tab_uni_jisx02127[]={
+static const uint16 tab_uni_jisx02127[]={
0x2742,0x2743,0x2744,0x2745,0x2746,0x2747,0x2748,0x2749,
0x274A,0x274B,0x274C, 0,0x274D,0x274E};
/* page 8 0x0452-0x045F */
-static uint16 tab_uni_jisx02128[]={
+static const uint16 tab_uni_jisx02128[]={
0x2772,0x2773,0x2774,0x2775,0x2776,0x2777,0x2778,0x2779,
0x277A,0x277B,0x277C, 0,0x277D,0x277E};
/* page 9 0x2122-0x2122 */
-static uint16 tab_uni_jisx02129[]={
+static const uint16 tab_uni_jisx02129[]={
0x226F};
/* page 10 0x2170-0x2179 */
-static uint16 tab_uni_jisx021210[]={
+static const uint16 tab_uni_jisx021210[]={
0x7373,0x7374,0x7375,0x7376,0x7377,0x7378,0x7379,0x737A,
0x737B,0x737C};
/* page 11 0x4E02-0x4F19 */
-static uint16 tab_uni_jisx021211[]={
+static const uint16 tab_uni_jisx021211[]={
0x3021, 0,0x3022,0x3023, 0, 0, 0, 0,
0, 0,0x3024, 0, 0, 0, 0, 0,
0x3025, 0, 0, 0, 0, 0, 0, 0,
@@ -4590,7 +4590,7 @@ static uint16 tab_uni_jisx021211[]={
};
/* page 12 0x4F2E-0x5166 */
-static uint16 tab_uni_jisx021212[]={
+static const uint16 tab_uni_jisx021212[]={
0x305D, 0, 0,0x305E, 0,0x3060, 0,0x3061,
0,0x3062, 0,0x3063, 0,0x3064, 0, 0,
0x3065, 0,0x3066, 0,0x3067, 0, 0, 0,
@@ -4665,7 +4665,7 @@ static uint16 tab_uni_jisx021212[]={
0x326E};
/* page 13 0x517E-0x5515 */
-static uint16 tab_uni_jisx021213[]={
+static const uint16 tab_uni_jisx021213[]={
0x326F, 0, 0, 0, 0,0x3270,0x3271, 0,
0, 0, 0, 0, 0,0x3272, 0, 0,
0x3273, 0, 0, 0, 0, 0, 0, 0,
@@ -4784,7 +4784,7 @@ static uint16 tab_uni_jisx021213[]={
};
/* page 14 0x552A-0x5566 */
-static uint16 tab_uni_jisx021214[]={
+static const uint16 tab_uni_jisx021214[]={
0x354E,0x354F, 0, 0, 0, 0, 0, 0,
0x3550, 0, 0,0x3551,0x3552, 0, 0, 0,
0,0x3553,0x3554,0x3555, 0, 0, 0,0x3556,
@@ -4795,7 +4795,7 @@ static uint16 tab_uni_jisx021214[]={
0, 0,0x3563, 0,0x3564};
/* page 15 0x557F-0x5C36 */
-static uint16 tab_uni_jisx021215[]={
+static const uint16 tab_uni_jisx021215[]={
0x3565, 0,0x3566,0x3567, 0, 0, 0,0x3568,
0,0x3569, 0, 0, 0, 0, 0,0x356A,
0x356B, 0,0x356C,0x356D,0x356E,0x356F, 0, 0,
@@ -5014,7 +5014,7 @@ static uint16 tab_uni_jisx021215[]={
};
/* page 16 0x5C59-0x5EEB */
-static uint16 tab_uni_jisx021216[]={
+static const uint16 tab_uni_jisx021216[]={
0x3A77,0x3A78, 0,0x3A79, 0, 0, 0, 0,
0,0x3A7A,0x3A7B, 0, 0, 0,0x3A7C,0x3A7D,
0x3A7E, 0, 0, 0,0x3B21, 0, 0,0x3B22,
@@ -5100,7 +5100,7 @@ static uint16 tab_uni_jisx021216[]={
0, 0,0x3C5B};
/* page 17 0x5F02-0x6149 */
-static uint16 tab_uni_jisx021217[]={
+static const uint16 tab_uni_jisx021217[]={
0x3C5C, 0, 0, 0,0x3C5D,0x3C5E,0x3C5F, 0,
0, 0, 0, 0,0x3C60, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,0x3C61,
@@ -5177,7 +5177,7 @@ static uint16 tab_uni_jisx021217[]={
};
/* page 18 0x615E-0x6290 */
-static uint16 tab_uni_jisx021218[]={
+static const uint16 tab_uni_jisx021218[]={
0x3E53, 0,0x3E54, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x3E55, 0,
0, 0, 0, 0,0x3E56, 0, 0, 0,
@@ -5219,7 +5219,7 @@ static uint16 tab_uni_jisx021218[]={
0x3F46,0x3F47,0x3F48};
/* page 19 0x62A6-0x679B */
-static uint16 tab_uni_jisx021219[]={
+static const uint16 tab_uni_jisx021219[]={
0x3F49, 0,0x3F4A, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,0x3F4B, 0, 0,
0x3F4C,0x3F4D, 0, 0,0x3F4E, 0, 0, 0,
@@ -5381,7 +5381,7 @@ static uint16 tab_uni_jisx021219[]={
0x432D, 0,0x432E,0x432F, 0,0x4330};
/* page 20 0x67B0-0x6801 */
-static uint16 tab_uni_jisx021220[]={
+static const uint16 tab_uni_jisx021220[]={
0x4331,0x4332,0x4333, 0, 0,0x4334, 0, 0,
0, 0, 0,0x4335,0x4336,0x4337, 0, 0,
0x4339, 0,0x433A,0x433B, 0,0x433C, 0, 0,
@@ -5395,7 +5395,7 @@ static uint16 tab_uni_jisx021220[]={
0,0x7446};
/* page 21 0x6814-0x6917 */
-static uint16 tab_uni_jisx021221[]={
+static const uint16 tab_uni_jisx021221[]={
0x434A, 0, 0, 0, 0,0x434B, 0, 0,
0,0x434C, 0,0x434D, 0, 0, 0, 0,
0, 0, 0,0x434F,0x434E, 0, 0, 0,
@@ -5431,7 +5431,7 @@ static uint16 tab_uni_jisx021221[]={
0, 0,0x443B,0x443C};
/* page 22 0x6931-0x6D3F */
-static uint16 tab_uni_jisx021222[]={
+static const uint16 tab_uni_jisx021222[]={
0x443D, 0,0x443E, 0,0x443F, 0, 0,0x4440,
0, 0,0x4441, 0, 0, 0, 0, 0,
0,0x4442, 0, 0,0x4443, 0, 0, 0,
@@ -5564,7 +5564,7 @@ static uint16 tab_uni_jisx021222[]={
0x473A, 0, 0,0x473B, 0, 0,0x473C};
/* page 23 0x6D57-0x6E04 */
-static uint16 tab_uni_jisx021223[]={
+static const uint16 tab_uni_jisx021223[]={
0x473D, 0, 0, 0, 0, 0, 0,0x473E,
0x473F, 0,0x4740, 0, 0, 0,0x4741, 0,
0x4742, 0, 0, 0, 0, 0, 0, 0,
@@ -5589,7 +5589,7 @@ static uint16 tab_uni_jisx021223[]={
0,0x4767, 0, 0, 0,0x4768};
/* page 24 0x6E1E-0x6ECF */
-static uint16 tab_uni_jisx021224[]={
+static const uint16 tab_uni_jisx021224[]={
0x4769, 0, 0, 0,0x476A, 0, 0, 0,
0,0x476B, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0x476C, 0, 0, 0,
@@ -5615,7 +5615,7 @@ static uint16 tab_uni_jisx021224[]={
0x4839,0x483A};
/* page 25 0x6EEB-0x70E4 */
-static uint16 tab_uni_jisx021225[]={
+static const uint16 tab_uni_jisx021225[]={
0x483B, 0,0x483C,0x483D, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x483E, 0,
0x483F, 0,0x4840, 0, 0, 0, 0, 0,
@@ -5682,7 +5682,7 @@ static uint16 tab_uni_jisx021225[]={
0,0x4960};
/* page 26 0x70FA-0x71DC */
-static uint16 tab_uni_jisx021226[]={
+static const uint16 tab_uni_jisx021226[]={
0x4961, 0, 0, 0, 0, 0, 0, 0,
0,0x4962,0x4963,0x4964,0x4965,0x4966, 0, 0,
0,0x4967,0x4968, 0, 0,0x4969, 0, 0,
@@ -5714,7 +5714,7 @@ static uint16 tab_uni_jisx021226[]={
0x4A3A, 0,0x4A3B};
/* page 27 0x71F8-0x7E9E */
-static uint16 tab_uni_jisx021227[]={
+static const uint16 tab_uni_jisx021227[]={
0x4A3C, 0, 0, 0, 0, 0,0x4A3D, 0,
0x4A3E, 0, 0, 0, 0, 0, 0,0x4A3F,
0x4A40,0x4A41, 0, 0, 0, 0, 0, 0,
@@ -6122,7 +6122,7 @@ static uint16 tab_uni_jisx021227[]={
0x5467, 0,0x5468, 0, 0,0x5469,0x546A};
/* page 28 0x7F3B-0x8044 */
-static uint16 tab_uni_jisx021228[]={
+static const uint16 tab_uni_jisx021228[]={
0x546C,0x546B,0x546D,0x546E,0x546F, 0, 0, 0,
0x5470,0x5471, 0, 0,0x5472, 0, 0, 0,
0, 0, 0, 0,0x5473, 0, 0,0x5474,
@@ -6159,7 +6159,7 @@ static uint16 tab_uni_jisx021228[]={
0,0x5563};
/* page 29 0x8060-0x8362 */
-static uint16 tab_uni_jisx021229[]={
+static const uint16 tab_uni_jisx021229[]={
0x5564, 0, 0, 0,0x5565, 0,0x5566, 0,
0, 0, 0, 0, 0,0x5567, 0, 0,
0,0x5568, 0, 0, 0,0x5569, 0, 0,
@@ -6259,7 +6259,7 @@ static uint16 tab_uni_jisx021229[]={
0, 0,0x745F};
/* page 30 0x8370-0x8419 */
-static uint16 tab_uni_jisx021230[]={
+static const uint16 tab_uni_jisx021230[]={
0x577D, 0, 0, 0, 0, 0, 0, 0,
0x577E, 0, 0, 0, 0,0x5821, 0,0x5822,
0x5823, 0,0x5824, 0,0x5825, 0,0x5826, 0,
@@ -6284,7 +6284,7 @@ static uint16 tab_uni_jisx021230[]={
0,0x584B};
/* page 31 0x842F-0x8880 */
-static uint16 tab_uni_jisx021231[]={
+static const uint16 tab_uni_jisx021231[]={
0x584D, 0, 0, 0, 0, 0, 0, 0,
0, 0,0x584E, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x584F, 0,
@@ -6426,7 +6426,7 @@ static uint16 tab_uni_jisx021231[]={
0,0x5C38};
/* page 32 0x8898-0x89BC */
-static uint16 tab_uni_jisx021232[]={
+static const uint16 tab_uni_jisx021232[]={
0x5C39, 0,0x5C3A,0x5C3B,0x5C3C, 0, 0,0x5C3D,
0x5C3E, 0, 0, 0, 0, 0, 0, 0,
0x5C3F, 0,0x5C40, 0, 0, 0, 0, 0,
@@ -6466,7 +6466,7 @@ static uint16 tab_uni_jisx021232[]={
0, 0, 0, 0,0x5D33};
/* page 33 0x89D4-0x8B9F */
-static uint16 tab_uni_jisx021233[]={
+static const uint16 tab_uni_jisx021233[]={
0x5D34,0x5D35,0x5D36,0x5D37,0x5D38, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0,0x5D39, 0, 0, 0,0x5D3A, 0,0x5D3B,
@@ -6527,7 +6527,7 @@ static uint16 tab_uni_jisx021233[]={
0x5E5F, 0,0x5E60,0x5E61};
/* page 34 0x8C38-0x8CA4 */
-static uint16 tab_uni_jisx021234[]={
+static const uint16 tab_uni_jisx021234[]={
0x5E62,0x5E63, 0, 0, 0,0x5E64,0x5E65, 0,
0, 0, 0, 0, 0,0x5E66, 0,0x5E67,
0,0x5E68, 0,0x5E69, 0, 0, 0,0x5E6A,
@@ -6544,7 +6544,7 @@ static uint16 tab_uni_jisx021234[]={
0, 0, 0, 0,0x5F29};
/* page 35 0x8CB9-0x8D1B */
-static uint16 tab_uni_jisx021235[]={
+static const uint16 tab_uni_jisx021235[]={
0x5F2A,0x5F2B, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0x5F2C,0x5F2D, 0, 0,
0x5F2E, 0,0x5F2F, 0, 0, 0,0x5F30, 0,
@@ -6560,7 +6560,7 @@ static uint16 tab_uni_jisx021235[]={
0, 0,0x5F45};
/* page 36 0x8D65-0x8F65 */
-static uint16 tab_uni_jisx021236[]={
+static const uint16 tab_uni_jisx021236[]={
0x5F46, 0, 0, 0,0x5F47, 0, 0,0x5F48,
0,0x5F49, 0, 0, 0, 0, 0, 0,
0,0x7468, 0, 0, 0, 0, 0, 0,
@@ -6628,7 +6628,7 @@ static uint16 tab_uni_jisx021236[]={
0x612C};
/* page 37 0x8F9D-0x9484 */
-static uint16 tab_uni_jisx021237[]={
+static const uint16 tab_uni_jisx021237[]={
0x612D, 0, 0,0x612E,0x612F, 0, 0,0x6130,
0x6131,0x6132, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -6789,7 +6789,7 @@ static uint16 tab_uni_jisx021237[]={
};
/* page 38 0x9578-0x95E6 */
-static uint16 tab_uni_jisx021238[]={
+static const uint16 tab_uni_jisx021238[]={
0x657D,0x657E, 0, 0, 0, 0,0x6621, 0,
0, 0, 0, 0,0x6622, 0, 0, 0,
0x6623, 0, 0, 0,0x6624,0x6625,0x6626, 0,
@@ -6806,7 +6806,7 @@ static uint16 tab_uni_jisx021238[]={
0x6641, 0, 0, 0,0x6642, 0,0x6643};
/* page 39 0x961D-0x986C */
-static uint16 tab_uni_jisx021239[]={
+static const uint16 tab_uni_jisx021239[]={
0x6644,0x6645, 0, 0, 0,0x6646, 0,0x6647,
0x6648,0x6649, 0, 0, 0, 0, 0,0x664A,
0, 0, 0, 0,0x664B, 0,0x664C, 0,
@@ -6884,7 +6884,7 @@ static uint16 tab_uni_jisx021239[]={
};
/* page 40 0x98AB-0x98CC */
-static uint16 tab_uni_jisx021240[]={
+static const uint16 tab_uni_jisx021240[]={
0x683A, 0,0x683B,0x683C, 0,0x683D, 0, 0,
0,0x683E, 0, 0,0x683F,0x6840, 0,0x6841,
0x6842, 0, 0, 0,0x6843, 0, 0,0x6844,
@@ -6892,7 +6892,7 @@ static uint16 tab_uni_jisx021240[]={
0,0x6847};
/* page 41 0x98E1-0x9960 */
-static uint16 tab_uni_jisx021241[]={
+static const uint16 tab_uni_jisx021241[]={
0x6848, 0,0x6849, 0,0x684A,0x684B,0x684C, 0,
0,0x684D, 0, 0, 0, 0, 0, 0,
0, 0,0x684E, 0, 0,0x684F, 0, 0,
@@ -6912,7 +6912,7 @@ static uint16 tab_uni_jisx021241[]={
};
/* page 42 0x999B-0x9A5D */
-static uint16 tab_uni_jisx021242[]={
+static const uint16 tab_uni_jisx021242[]={
0x6877, 0,0x6878,0x747A,0x6879, 0, 0, 0,
0, 0, 0,0x687A, 0, 0, 0, 0,
0, 0, 0, 0, 0,0x687B,0x687C,0x687D,
@@ -6940,7 +6940,7 @@ static uint16 tab_uni_jisx021242[]={
0, 0,0x6955};
/* page 43 0x9AAA-0x9C7B */
-static uint16 tab_uni_jisx021243[]={
+static const uint16 tab_uni_jisx021243[]={
0x6956, 0,0x6957, 0,0x6958,0x6959, 0, 0,
0x695A, 0,0x695B,0x695C,0x695D, 0, 0,0x695E,
0,0x695F, 0, 0,0x6960,0x6961, 0,0x6962,
@@ -7002,7 +7002,7 @@ static uint16 tab_uni_jisx021243[]={
0,0x6B58};
/* page 44 0x9CE6-0x9E1D */
-static uint16 tab_uni_jisx021244[]={
+static const uint16 tab_uni_jisx021244[]={
0x6B59, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0x6B5A, 0, 0, 0,
0,0x6B5B, 0,0x6B5C, 0, 0, 0, 0,
@@ -7045,7 +7045,7 @@ static uint16 tab_uni_jisx021244[]={
};
/* page 45 0x9E7A-0x9FA5 */
-static uint16 tab_uni_jisx021245[]={
+static const uint16 tab_uni_jisx021245[]={
0x6C59,0x6C5A,0x6C5B, 0, 0, 0,0x6C5C, 0,
0x6C5D,0x6C5E,0x6C5F,0x6C60, 0,0x6C61, 0, 0,
0, 0, 0, 0,0x6C62,0x6C63, 0, 0,
@@ -7086,15 +7086,15 @@ static uint16 tab_uni_jisx021245[]={
0x6D61,0x6D62, 0,0x6D63};
/* page 46 0xF929-0xF929 */
-static uint16 tab_uni_jisx021246[]={
+static const uint16 tab_uni_jisx021246[]={
0x7445};
/* page 47 0xF9DC-0xF9DC */
-static uint16 tab_uni_jisx021247[]={
+static const uint16 tab_uni_jisx021247[]={
0x7472};
/* page 48 0xFA00-0xFA2D */
-static uint16 tab_uni_jisx021248[]={
+static const uint16 tab_uni_jisx021248[]={
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x7434,0x7437,
0x7438,0x743D,0x7444,0x7447,0x7448,0x744E,0x744F,0x7453,
@@ -7103,11 +7103,11 @@ static uint16 tab_uni_jisx021248[]={
0x7470,0x7473,0x7477,0x7478,0x7479,0x747D};
/* page 49 0xFF00-0XFF07 */
-static uint16 tab_uni_jisx021249[]={
+static const uint16 tab_uni_jisx021249[]={
0, 0,0x742A, 0, 0, 0, 0,0x7429};
/* page 50 0xFFE4-0xFFE4 */
-static uint16 tab_uni_jisx021250[]={
+static const uint16 tab_uni_jisx021250[]={
0x2243};
static int
@@ -7218,34 +7218,34 @@ my_uni_jisx0212_onechar(int code){
}
/* page 0 0x222F-0x2244 */
-static uint16 tab_jisx0212_uni0[]={
+static const uint16 tab_jisx0212_uni0[]={
0x02D8,0x02C7,0x00B8,0x02D9,0x02DD,0x00AF,0x02DB,0x02DA,
0xFF5E,0x0384,0x0385, 0, 0, 0, 0, 0,
0, 0, 0,0x00A1,0xFFE4,0x00BF};
/* page 1 0x226B-0x2271 */
-static uint16 tab_jisx0212_uni1[]={
+static const uint16 tab_jisx0212_uni1[]={
0x00BA,0x00AA,0x00A9,0x00AE,0x2122,0x00A4,0x2116};
/* page 2 0x2661-0x267C */
-static uint16 tab_jisx0212_uni2[]={
+static const uint16 tab_jisx0212_uni2[]={
0x0386,0x0388,0x0389,0x038A,0x03AA, 0,0x038C, 0,
0x038E,0x03AB, 0,0x038F, 0, 0, 0, 0,
0x03AC,0x03AD,0x03AE,0x03AF,0x03CA,0x0390,0x03CC,0x03C2,
0x03CD,0x03CB,0x03B0,0x03CE};
/* page 3 0x2742-0x274E */
-static uint16 tab_jisx0212_uni3[]={
+static const uint16 tab_jisx0212_uni3[]={
0x0402,0x0403,0x0404,0x0405,0x0406,0x0407,0x0408,0x0409,
0x040A,0x040B,0x040C,0x040E,0x040F};
/* page 4 0x2772-0x277E */
-static uint16 tab_jisx0212_uni4[]={
+static const uint16 tab_jisx0212_uni4[]={
0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459,
0x045A,0x045B,0x045C,0x045E,0x045F};
/* page 5 0x2921-0x2950 */
-static uint16 tab_jisx0212_uni5[]={
+static const uint16 tab_jisx0212_uni5[]={
0x00C6,0x0110, 0,0x0126, 0,0x0132, 0,0x0141,
0x013F, 0,0x014A,0x00D8,0x0152, 0,0x0166,0x00DE,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -7255,7 +7255,7 @@ static uint16 tab_jisx0212_uni5[]={
};
/* page 6 0x2A21-0x2A77 */
-static uint16 tab_jisx0212_uni6[]={
+static const uint16 tab_jisx0212_uni6[]={
0x00C1,0x00C0,0x00C4,0x00C2,0x0102,0x01CD,0x0100,0x0104,
0x00C5,0x00C3,0x0106,0x0108,0x010C,0x00C7,0x010A,0x010E,
0x00C9,0x00C8,0x00CB,0x00CA,0x011A,0x0116,0x0112,0x0118,
@@ -7269,7 +7269,7 @@ static uint16 tab_jisx0212_uni6[]={
0x0174,0x00DD,0x0178,0x0176,0x0179,0x017D,0x017B};
/* page 7 0x2B21-0x2B77 */
-static uint16 tab_jisx0212_uni7[]={
+static const uint16 tab_jisx0212_uni7[]={
0x00E1,0x00E0,0x00E4,0x00E2,0x0103,0x01CE,0x0101,0x0105,
0x00E5,0x00E3,0x0107,0x0109,0x010D,0x00E7,0x010B,0x010F,
0x00E9,0x00E8,0x00EB,0x00EA,0x011B,0x0117,0x0113,0x0119,
@@ -7283,7 +7283,7 @@ static uint16 tab_jisx0212_uni7[]={
0x0175,0x00FD,0x00FF,0x0177,0x017A,0x017E,0x017C};
/* page 8 0x3021-0x307E */
-static uint16 tab_jisx0212_uni8[]={
+static const uint16 tab_jisx0212_uni8[]={
0x4E02,0x4E04,0x4E05,0x4E0C,0x4E12,0x4E1F,0x4E23,0x4E24,
0x4E28,0x4E2B,0x4E2E,0x4E2F,0x4E30,0x4E35,0x4E40,0x4E41,
0x4E44,0x4E47,0x4E51,0x4E5A,0x4E5C,0x4E63,0x4E68,0x4E69,
@@ -7298,7 +7298,7 @@ static uint16 tab_jisx0212_uni8[]={
0x4F7A,0x4F7D,0x4F7E,0x4F81,0x4F82,0x4F84};
/* page 9 0x3121-0x317E */
-static uint16 tab_jisx0212_uni9[]={
+static const uint16 tab_jisx0212_uni9[]={
0x4F85,0x4F89,0x4F8A,0x4F8C,0x4F8E,0x4F90,0x4F92,0x4F93,
0x4F94,0x4F97,0x4F99,0x4F9A,0x4F9E,0x4F9F,0x4FB2,0x4FB7,
0x4FB9,0x4FBB,0x4FBC,0x4FBD,0x4FBE,0x4FC0,0x4FC1,0x4FC5,
@@ -7313,7 +7313,7 @@ static uint16 tab_jisx0212_uni9[]={
0x5084,0x5086,0x508A,0x508E,0x508F,0x5090};
/* page 10 0x3221-0x327E */
-static uint16 tab_jisx0212_uni10[]={
+static const uint16 tab_jisx0212_uni10[]={
0x5092,0x5093,0x5094,0x5096,0x509B,0x509C,0x509E,0x509F,
0x50A0,0x50A1,0x50A2,0x50AA,0x50AF,0x50B0,0x50B9,0x50BA,
0x50BD,0x50C0,0x50C3,0x50C4,0x50C7,0x50CC,0x50CE,0x50D0,
@@ -7328,7 +7328,7 @@ static uint16 tab_jisx0212_uni10[]={
0x51B8,0x51BA,0x51BC,0x51BE,0x51BF,0x51C2};
/* page 11 0x3321-0x337E */
-static uint16 tab_jisx0212_uni11[]={
+static const uint16 tab_jisx0212_uni11[]={
0x51C8,0x51CF,0x51D1,0x51D2,0x51D3,0x51D5,0x51D8,0x51DE,
0x51E2,0x51E5,0x51EE,0x51F2,0x51F3,0x51F4,0x51F7,0x5201,
0x5202,0x5205,0x5212,0x5213,0x5215,0x5216,0x5218,0x5222,
@@ -7343,7 +7343,7 @@ static uint16 tab_jisx0212_uni11[]={
0x52F6,0x52F7,0x5300,0x5303,0x530A,0x530B};
/* page 12 0x3421-0x347E */
-static uint16 tab_jisx0212_uni12[]={
+static const uint16 tab_jisx0212_uni12[]={
0x530C,0x5311,0x5313,0x5318,0x531B,0x531C,0x531E,0x531F,
0x5325,0x5327,0x5328,0x5329,0x532B,0x532C,0x532D,0x5330,
0x5332,0x5335,0x533C,0x533D,0x533E,0x5342,0x534C,0x534B,
@@ -7358,7 +7358,7 @@ static uint16 tab_jisx0212_uni12[]={
0x5469,0x546B,0x546D,0x546E,0x5474,0x547F};
/* page 13 0x3521-0x357E */
-static uint16 tab_jisx0212_uni13[]={
+static const uint16 tab_jisx0212_uni13[]={
0x5481,0x5483,0x5485,0x5488,0x5489,0x548D,0x5491,0x5495,
0x5496,0x549C,0x549F,0x54A1,0x54A6,0x54A7,0x54A9,0x54AA,
0x54AD,0x54AE,0x54B1,0x54B7,0x54B9,0x54BA,0x54BB,0x54BF,
@@ -7373,7 +7373,7 @@ static uint16 tab_jisx0212_uni13[]={
0x55C9,0x55CB,0x55CC,0x55CE,0x55D1,0x55D2};
/* page 14 0x3621-0x367E */
-static uint16 tab_jisx0212_uni14[]={
+static const uint16 tab_jisx0212_uni14[]={
0x55D3,0x55D7,0x55D8,0x55DB,0x55DE,0x55E2,0x55E9,0x55F6,
0x55FF,0x5605,0x5608,0x560A,0x560D,0x560E,0x560F,0x5610,
0x5611,0x5612,0x5619,0x562C,0x5630,0x5633,0x5635,0x5637,
@@ -7388,7 +7388,7 @@ static uint16 tab_jisx0212_uni14[]={
0x56E6,0x56E7,0x56E8,0x56F1,0x56EB,0x56ED};
/* page 15 0x3721-0x377E */
-static uint16 tab_jisx0212_uni15[]={
+static const uint16 tab_jisx0212_uni15[]={
0x56F6,0x56F7,0x5701,0x5702,0x5707,0x570A,0x570C,0x5711,
0x5715,0x571A,0x571B,0x571D,0x5720,0x5722,0x5723,0x5724,
0x5725,0x5729,0x572A,0x572C,0x572E,0x572F,0x5733,0x5734,
@@ -7403,7 +7403,7 @@ static uint16 tab_jisx0212_uni15[]={
0x57FF,0x5803,0x5804,0x5808,0x5809,0x57E1};
/* page 16 0x3821-0x387E */
-static uint16 tab_jisx0212_uni16[]={
+static const uint16 tab_jisx0212_uni16[]={
0x580C,0x580D,0x581B,0x581E,0x581F,0x5820,0x5826,0x5827,
0x582D,0x5832,0x5839,0x583F,0x5849,0x584C,0x584D,0x584F,
0x5850,0x5855,0x585F,0x5861,0x5864,0x5867,0x5868,0x5878,
@@ -7418,7 +7418,7 @@ static uint16 tab_jisx0212_uni16[]={
0x595E,0x595F,0x5961,0x5963,0x596B,0x596D};
/* page 17 0x3921-0x397E */
-static uint16 tab_jisx0212_uni17[]={
+static const uint16 tab_jisx0212_uni17[]={
0x596F,0x5972,0x5975,0x5976,0x5979,0x597B,0x597C,0x598B,
0x598C,0x598E,0x5992,0x5995,0x5997,0x599F,0x59A4,0x59A7,
0x59AD,0x59AE,0x59AF,0x59B0,0x59B3,0x59B7,0x59BA,0x59BC,
@@ -7433,7 +7433,7 @@ static uint16 tab_jisx0212_uni17[]={
0x5AB3,0x5AB5,0x5AB8,0x5ABA,0x5ABB,0x5ABF};
/* page 18 0x3A21-0x3A7E */
-static uint16 tab_jisx0212_uni18[]={
+static const uint16 tab_jisx0212_uni18[]={
0x5AC4,0x5AC6,0x5AC8,0x5ACF,0x5ADA,0x5ADC,0x5AE0,0x5AE5,
0x5AEA,0x5AEE,0x5AF5,0x5AF6,0x5AFD,0x5B00,0x5B01,0x5B08,
0x5B17,0x5B34,0x5B19,0x5B1B,0x5B1D,0x5B21,0x5B25,0x5B2D,
@@ -7448,7 +7448,7 @@ static uint16 tab_jisx0212_uni18[]={
0x5C5C,0x5C62,0x5C63,0x5C67,0x5C68,0x5C69};
/* page 19 0x3B21-0x3B7E */
-static uint16 tab_jisx0212_uni19[]={
+static const uint16 tab_jisx0212_uni19[]={
0x5C6D,0x5C70,0x5C74,0x5C75,0x5C7A,0x5C7B,0x5C7C,0x5C7D,
0x5C87,0x5C88,0x5C8A,0x5C8F,0x5C92,0x5C9D,0x5C9F,0x5CA0,
0x5CA2,0x5CA3,0x5CA6,0x5CAA,0x5CB2,0x5CB4,0x5CB5,0x5CBA,
@@ -7463,7 +7463,7 @@ static uint16 tab_jisx0212_uni19[]={
0x5DD0,0x5DCE,0x5DD8,0x5DD9,0x5DE0,0x5DE4};
/* page 20 0x3C21-0x3C7E */
-static uint16 tab_jisx0212_uni20[]={
+static const uint16 tab_jisx0212_uni20[]={
0x5DE9,0x5DF8,0x5DF9,0x5E00,0x5E07,0x5E0D,0x5E12,0x5E14,
0x5E15,0x5E18,0x5E1F,0x5E20,0x5E2E,0x5E28,0x5E32,0x5E35,
0x5E3E,0x5E4B,0x5E50,0x5E49,0x5E51,0x5E56,0x5E58,0x5E5B,
@@ -7478,7 +7478,7 @@ static uint16 tab_jisx0212_uni20[]={
0x5F58,0x5F5B,0x5F60,0x5F63,0x5F64,0x5F67};
/* page 21 0x3D21-0x3D7E */
-static uint16 tab_jisx0212_uni21[]={
+static const uint16 tab_jisx0212_uni21[]={
0x5F6F,0x5F72,0x5F74,0x5F75,0x5F78,0x5F7A,0x5F7D,0x5F7E,
0x5F89,0x5F8D,0x5F8F,0x5F96,0x5F9C,0x5F9D,0x5FA2,0x5FA7,
0x5FAB,0x5FA4,0x5FAC,0x5FAF,0x5FB0,0x5FB1,0x5FB8,0x5FC4,
@@ -7493,7 +7493,7 @@ static uint16 tab_jisx0212_uni21[]={
0x60A4,0x60A5,0x60A8,0x60B0,0x60B1,0x60B7};
/* page 22 0x3E21-0x3E7E */
-static uint16 tab_jisx0212_uni22[]={
+static const uint16 tab_jisx0212_uni22[]={
0x60BB,0x60BE,0x60C2,0x60C4,0x60C8,0x60C9,0x60CA,0x60CB,
0x60CE,0x60CF,0x60D4,0x60D5,0x60D9,0x60DB,0x60DD,0x60DE,
0x60E2,0x60E5,0x60F2,0x60F5,0x60F8,0x60FC,0x60FD,0x6102,
@@ -7508,7 +7508,7 @@ static uint16 tab_jisx0212_uni22[]={
0x61DF,0x61E1,0x61E2,0x61E7,0x61E9,0x61E5};
/* page 23 0x3F21-0x3F7E */
-static uint16 tab_jisx0212_uni23[]={
+static const uint16 tab_jisx0212_uni23[]={
0x61EC,0x61ED,0x61EF,0x6201,0x6203,0x6204,0x6207,0x6213,
0x6215,0x621C,0x6220,0x6222,0x6223,0x6227,0x6229,0x622B,
0x6239,0x623D,0x6242,0x6243,0x6244,0x6246,0x624C,0x6250,
@@ -7523,7 +7523,7 @@ static uint16 tab_jisx0212_uni23[]={
0x6366,0x636C,0x636D,0x6371,0x6374,0x6375};
/* page 24 0x4021-0x407E */
-static uint16 tab_jisx0212_uni24[]={
+static const uint16 tab_jisx0212_uni24[]={
0x6378,0x637C,0x637D,0x637F,0x6382,0x6384,0x6387,0x638A,
0x6390,0x6394,0x6395,0x6399,0x639A,0x639E,0x63A4,0x63A6,
0x63AD,0x63AE,0x63AF,0x63BD,0x63C1,0x63C5,0x63C8,0x63CE,
@@ -7538,7 +7538,7 @@ static uint16 tab_jisx0212_uni24[]={
0x64A8,0x64AC,0x64B3,0x64BD,0x64BE,0x64BF};
/* page 25 0x4121-0x417E */
-static uint16 tab_jisx0212_uni25[]={
+static const uint16 tab_jisx0212_uni25[]={
0x64C4,0x64C9,0x64CA,0x64CB,0x64CC,0x64CE,0x64D0,0x64D1,
0x64D5,0x64D7,0x64E4,0x64E5,0x64E9,0x64EA,0x64ED,0x64F0,
0x64F5,0x64F7,0x64FB,0x64FF,0x6501,0x6504,0x6508,0x6509,
@@ -7553,7 +7553,7 @@ static uint16 tab_jisx0212_uni25[]={
0x660D,0x6611,0x6612,0x6615,0x6616,0x661D};
/* page 26 0x4221-0x427E */
-static uint16 tab_jisx0212_uni26[]={
+static const uint16 tab_jisx0212_uni26[]={
0x661E,0x6621,0x6622,0x6623,0x6624,0x6626,0x6629,0x662A,
0x662B,0x662C,0x662E,0x6630,0x6631,0x6633,0x6639,0x6637,
0x6640,0x6645,0x6646,0x664A,0x664C,0x6651,0x664E,0x6657,
@@ -7568,7 +7568,7 @@ static uint16 tab_jisx0212_uni26[]={
0x6747,0x6748,0x674C,0x6754,0x6755,0x675D};
/* page 27 0x4321-0x437E */
-static uint16 tab_jisx0212_uni27[]={
+static const uint16 tab_jisx0212_uni27[]={
0x6766,0x676C,0x676E,0x6774,0x6776,0x677B,0x6781,0x6784,
0x678E,0x678F,0x6791,0x6793,0x6796,0x6798,0x6799,0x679B,
0x67B0,0x67B1,0x67B2,0x67B5,0x67BB,0x67BC,0x67BD,0x67F9,
@@ -7583,7 +7583,7 @@ static uint16 tab_jisx0212_uni27[]={
0x68B2,0x68BB,0x68C5,0x68C8,0x68CC,0x68CF};
/* page 28 0x4421-0x447E */
-static uint16 tab_jisx0212_uni28[]={
+static const uint16 tab_jisx0212_uni28[]={
0x68D0,0x68D1,0x68D3,0x68D6,0x68D9,0x68DC,0x68DD,0x68E5,
0x68E8,0x68EA,0x68EB,0x68EC,0x68ED,0x68F0,0x68F1,0x68F5,
0x68F6,0x68FB,0x68FC,0x68FD,0x6906,0x6909,0x690A,0x6910,
@@ -7598,7 +7598,7 @@ static uint16 tab_jisx0212_uni28[]={
0x6A1D,0x6A20,0x6A24,0x6A28,0x6A30,0x6A32};
/* page 29 0x4521-0x457E */
-static uint16 tab_jisx0212_uni29[]={
+static const uint16 tab_jisx0212_uni29[]={
0x6A34,0x6A37,0x6A3B,0x6A3E,0x6A3F,0x6A45,0x6A46,0x6A49,
0x6A4A,0x6A4E,0x6A50,0x6A51,0x6A52,0x6A55,0x6A56,0x6A5B,
0x6A64,0x6A67,0x6A6A,0x6A71,0x6A73,0x6A7E,0x6A81,0x6A83,
@@ -7613,7 +7613,7 @@ static uint16 tab_jisx0212_uni29[]={
0x6B67,0x6B6B,0x6B6E,0x6B70,0x6B75,0x6B7D};
/* page 30 0x4621-0x467E */
-static uint16 tab_jisx0212_uni30[]={
+static const uint16 tab_jisx0212_uni30[]={
0x6B7E,0x6B82,0x6B85,0x6B97,0x6B9B,0x6B9F,0x6BA0,0x6BA2,
0x6BA3,0x6BA8,0x6BA9,0x6BAC,0x6BAD,0x6BAE,0x6BB0,0x6BB8,
0x6BB9,0x6BBD,0x6BBE,0x6BC3,0x6BC4,0x6BC9,0x6BCC,0x6BD6,
@@ -7628,7 +7628,7 @@ static uint16 tab_jisx0212_uni30[]={
0x6CCF,0x6CD0,0x6CD1,0x6CD2,0x6CD4,0x6CD6};
/* page 31 0x4721-0x477E */
-static uint16 tab_jisx0212_uni31[]={
+static const uint16 tab_jisx0212_uni31[]={
0x6CDA,0x6CDC,0x6CE0,0x6CE7,0x6CE9,0x6CEB,0x6CEC,0x6CEE,
0x6CF2,0x6CF4,0x6D04,0x6D07,0x6D0A,0x6D0E,0x6D0F,0x6D11,
0x6D13,0x6D1A,0x6D26,0x6D27,0x6D28,0x6C67,0x6D2E,0x6D2F,
@@ -7643,7 +7643,7 @@ static uint16 tab_jisx0212_uni31[]={
0x6E53,0x6E54,0x6E57,0x6E5C,0x6E5D,0x6E5E};
/* page 32 0x4821-0x487E */
-static uint16 tab_jisx0212_uni32[]={
+static const uint16 tab_jisx0212_uni32[]={
0x6E62,0x6E63,0x6E68,0x6E73,0x6E7B,0x6E7D,0x6E8D,0x6E93,
0x6E99,0x6EA0,0x6EA7,0x6EAD,0x6EAE,0x6EB1,0x6EB3,0x6EBB,
0x6EBF,0x6EC0,0x6EC1,0x6EC3,0x6EC7,0x6EC8,0x6ECA,0x6ECD,
@@ -7658,7 +7658,7 @@ static uint16 tab_jisx0212_uni32[]={
0x6FB6,0x6FBC,0x6FC5,0x6FC7,0x6FC8,0x6FCA};
/* page 33 0x4921-0x497E */
-static uint16 tab_jisx0212_uni33[]={
+static const uint16 tab_jisx0212_uni33[]={
0x6FDA,0x6FDE,0x6FE8,0x6FE9,0x6FF0,0x6FF5,0x6FF9,0x6FFC,
0x6FFD,0x7000,0x7005,0x7006,0x7007,0x700D,0x7017,0x7020,
0x7023,0x702F,0x7034,0x7037,0x7039,0x703C,0x7043,0x7044,
@@ -7673,7 +7673,7 @@ static uint16 tab_jisx0212_uni33[]={
0x7152,0x7157,0x715A,0x715C,0x715E,0x7160};
/* page 34 0x4A21-0x4A7E */
-static uint16 tab_jisx0212_uni34[]={
+static const uint16 tab_jisx0212_uni34[]={
0x7168,0x7179,0x7180,0x7185,0x7187,0x718C,0x7192,0x719A,
0x719B,0x71A0,0x71A2,0x71AF,0x71B0,0x71B2,0x71B3,0x71BA,
0x71BF,0x71C0,0x71C1,0x71C4,0x71CB,0x71CC,0x71D3,0x71D6,
@@ -7688,7 +7688,7 @@ static uint16 tab_jisx0212_uni34[]={
0x72DF,0x72E5,0x72F3,0x72F4,0x72FA,0x72FB};
/* page 35 0x4B21-0x4B7E */
-static uint16 tab_jisx0212_uni35[]={
+static const uint16 tab_jisx0212_uni35[]={
0x72FE,0x7302,0x7304,0x7305,0x7307,0x730B,0x730D,0x7312,
0x7313,0x7318,0x7319,0x731E,0x7322,0x7324,0x7327,0x7328,
0x732C,0x7331,0x7332,0x7335,0x733A,0x733B,0x733D,0x7343,
@@ -7703,7 +7703,7 @@ static uint16 tab_jisx0212_uni35[]={
0x73F5,0x73F7,0x73F9,0x73FA,0x73FB,0x73FD};
/* page 36 0x4C21-0x4C7E */
-static uint16 tab_jisx0212_uni36[]={
+static const uint16 tab_jisx0212_uni36[]={
0x73FF,0x7400,0x7401,0x7404,0x7407,0x740A,0x7411,0x741A,
0x741B,0x7424,0x7426,0x7428,0x7429,0x742A,0x742B,0x742C,
0x742D,0x742E,0x742F,0x7430,0x7431,0x7439,0x7440,0x7443,
@@ -7718,7 +7718,7 @@ static uint16 tab_jisx0212_uni36[]={
0x74F4,0x74FA,0x74FB,0x74FC,0x74FF,0x7506};
/* page 37 0x4D21-0x4D7E */
-static uint16 tab_jisx0212_uni37[]={
+static const uint16 tab_jisx0212_uni37[]={
0x7512,0x7516,0x7517,0x7520,0x7521,0x7524,0x7527,0x7529,
0x752A,0x752F,0x7536,0x7539,0x753D,0x753E,0x753F,0x7540,
0x7543,0x7547,0x7548,0x754E,0x7550,0x7552,0x7557,0x755E,
@@ -7733,7 +7733,7 @@ static uint16 tab_jisx0212_uni37[]={
0x762D,0x7632,0x7633,0x7635,0x7638,0x7639};
/* page 38 0x4E21-0x4E7E */
-static uint16 tab_jisx0212_uni38[]={
+static const uint16 tab_jisx0212_uni38[]={
0x763A,0x763C,0x764A,0x7640,0x7641,0x7643,0x7644,0x7645,
0x7649,0x764B,0x7655,0x7659,0x765F,0x7664,0x7665,0x766D,
0x766E,0x766F,0x7671,0x7674,0x7681,0x7685,0x768C,0x768D,
@@ -7748,7 +7748,7 @@ static uint16 tab_jisx0212_uni38[]={
0x7757,0x775C,0x775E,0x775F,0x7760,0x7762};
/* page 39 0x4F21-0x4F7E */
-static uint16 tab_jisx0212_uni39[]={
+static const uint16 tab_jisx0212_uni39[]={
0x7764,0x7767,0x776A,0x776C,0x7770,0x7772,0x7773,0x7774,
0x777A,0x777D,0x7780,0x7784,0x778C,0x778D,0x7794,0x7795,
0x7796,0x779A,0x779F,0x77A2,0x77A7,0x77AA,0x77AE,0x77AF,
@@ -7763,7 +7763,7 @@ static uint16 tab_jisx0212_uni39[]={
0x78AC,0x78AD,0x78B0,0x78B1,0x78B2,0x78B3};
/* page 40 0x5021-0x507E */
-static uint16 tab_jisx0212_uni40[]={
+static const uint16 tab_jisx0212_uni40[]={
0x78BB,0x78BD,0x78BF,0x78C7,0x78C8,0x78C9,0x78CC,0x78CE,
0x78D2,0x78D3,0x78D5,0x78D6,0x78E4,0x78DB,0x78DF,0x78E0,
0x78E1,0x78E6,0x78EA,0x78F2,0x78F3,0x7900,0x78F6,0x78F7,
@@ -7778,7 +7778,7 @@ static uint16 tab_jisx0212_uni40[]={
0x79CF,0x79D4,0x79D6,0x79DA,0x79DD,0x79DE};
/* page 41 0x5121-0x517E */
-static uint16 tab_jisx0212_uni41[]={
+static const uint16 tab_jisx0212_uni41[]={
0x79E0,0x79E2,0x79E5,0x79EA,0x79EB,0x79ED,0x79F1,0x79F8,
0x79FC,0x7A02,0x7A03,0x7A07,0x7A09,0x7A0A,0x7A0C,0x7A11,
0x7A15,0x7A1B,0x7A1E,0x7A21,0x7A27,0x7A2B,0x7A2D,0x7A2F,
@@ -7793,7 +7793,7 @@ static uint16 tab_jisx0212_uni41[]={
0x7B2A,0x7B2B,0x7B2D,0x7B2E,0x7B2F,0x7B30};
/* page 42 0x5221-0x527E */
-static uint16 tab_jisx0212_uni42[]={
+static const uint16 tab_jisx0212_uni42[]={
0x7B31,0x7B34,0x7B3D,0x7B3F,0x7B40,0x7B41,0x7B47,0x7B4E,
0x7B55,0x7B60,0x7B64,0x7B66,0x7B69,0x7B6A,0x7B6D,0x7B6F,
0x7B72,0x7B73,0x7B77,0x7B84,0x7B89,0x7B8E,0x7B90,0x7B91,
@@ -7808,7 +7808,7 @@ static uint16 tab_jisx0212_uni42[]={
0x7C59,0x7C5A,0x7C5B,0x7C5C,0x7C5D,0x7C5E};
/* page 43 0x5321-0x537E */
-static uint16 tab_jisx0212_uni43[]={
+static const uint16 tab_jisx0212_uni43[]={
0x7C61,0x7C63,0x7C67,0x7C69,0x7C6D,0x7C6E,0x7C70,0x7C72,
0x7C79,0x7C7C,0x7C7D,0x7C86,0x7C87,0x7C8F,0x7C94,0x7C9E,
0x7CA0,0x7CA6,0x7CB0,0x7CB6,0x7CB7,0x7CBA,0x7CBB,0x7CBC,
@@ -7823,7 +7823,7 @@ static uint16 tab_jisx0212_uni43[]={
0x7D8C,0x7D8D,0x7D91,0x7D96,0x7D97,0x7D9D};
/* page 44 0x5421-0x547E */
-static uint16 tab_jisx0212_uni44[]={
+static const uint16 tab_jisx0212_uni44[]={
0x7D9E,0x7DA6,0x7DA7,0x7DAA,0x7DB3,0x7DB6,0x7DB7,0x7DB9,
0x7DC2,0x7DC3,0x7DC4,0x7DC5,0x7DC6,0x7DCC,0x7DCD,0x7DCE,
0x7DD7,0x7DD9,0x7E00,0x7DE2,0x7DE5,0x7DE6,0x7DEA,0x7DEB,
@@ -7838,7 +7838,7 @@ static uint16 tab_jisx0212_uni44[]={
0x7F61,0x7F63,0x7F64,0x7F65,0x7F66,0x7F6D};
/* page 45 0x5521-0x557E */
-static uint16 tab_jisx0212_uni45[]={
+static const uint16 tab_jisx0212_uni45[]={
0x7F71,0x7F7D,0x7F7E,0x7F7F,0x7F80,0x7F8B,0x7F8D,0x7F8F,
0x7F90,0x7F91,0x7F96,0x7F97,0x7F9C,0x7FA1,0x7FA2,0x7FA6,
0x7FAA,0x7FAD,0x7FB4,0x7FBC,0x7FBF,0x7FC0,0x7FC3,0x7FC8,
@@ -7853,7 +7853,7 @@ static uint16 tab_jisx0212_uni45[]={
0x80D5,0x80D7,0x80D8,0x80E0,0x80ED,0x80EE};
/* page 46 0x5621-0x567E */
-static uint16 tab_jisx0212_uni46[]={
+static const uint16 tab_jisx0212_uni46[]={
0x80F0,0x80F2,0x80F3,0x80F6,0x80F9,0x80FA,0x80FE,0x8103,
0x810B,0x8116,0x8117,0x8118,0x811C,0x811E,0x8120,0x8124,
0x8127,0x812C,0x8130,0x8135,0x813A,0x813C,0x8145,0x8147,
@@ -7868,7 +7868,7 @@ static uint16 tab_jisx0212_uni46[]={
0x8234,0x823A,0x8243,0x8244,0x8245,0x8246};
/* page 47 0x5721-0x577E */
-static uint16 tab_jisx0212_uni47[]={
+static const uint16 tab_jisx0212_uni47[]={
0x824B,0x824E,0x824F,0x8251,0x8256,0x825C,0x8260,0x8263,
0x8267,0x826D,0x8274,0x827B,0x827D,0x827F,0x8280,0x8281,
0x8283,0x8284,0x8287,0x8289,0x828A,0x828E,0x8291,0x8294,
@@ -7883,7 +7883,7 @@ static uint16 tab_jisx0212_uni47[]={
0x8351,0x8355,0x8356,0x8357,0x8370,0x8378};
/* page 48 0x5821-0x587E */
-static uint16 tab_jisx0212_uni48[]={
+static const uint16 tab_jisx0212_uni48[]={
0x837D,0x837F,0x8380,0x8382,0x8384,0x8386,0x838D,0x8392,
0x8394,0x8395,0x8398,0x8399,0x839B,0x839C,0x839D,0x83A6,
0x83A7,0x83A9,0x83AC,0x83BE,0x83BF,0x83C0,0x83C7,0x83C9,
@@ -7898,7 +7898,7 @@ static uint16 tab_jisx0212_uni48[]={
0x84C2,0x84C7,0x84C8,0x84CC,0x84CF,0x84D3};
/* page 49 0x5921-0x597E */
-static uint16 tab_jisx0212_uni49[]={
+static const uint16 tab_jisx0212_uni49[]={
0x84DC,0x84E7,0x84EA,0x84EF,0x84F0,0x84F1,0x84F2,0x84F7,
0x8532,0x84FA,0x84FB,0x84FD,0x8502,0x8503,0x8507,0x850C,
0x850E,0x8510,0x851C,0x851E,0x8522,0x8523,0x8524,0x8525,
@@ -7913,7 +7913,7 @@ static uint16 tab_jisx0212_uni49[]={
0x85E6,0x85E8,0x85ED,0x85F3,0x85F6,0x85FC};
/* page 50 0x5A21-0x5A7E */
-static uint16 tab_jisx0212_uni50[]={
+static const uint16 tab_jisx0212_uni50[]={
0x85FF,0x8600,0x8604,0x8605,0x860D,0x860E,0x8610,0x8611,
0x8612,0x8618,0x8619,0x861B,0x861E,0x8621,0x8627,0x8629,
0x8636,0x8638,0x863A,0x863C,0x863D,0x8640,0x8642,0x8646,
@@ -7928,7 +7928,7 @@ static uint16 tab_jisx0212_uni50[]={
0x8714,0x8719,0x871E,0x871F,0x8721,0x8723};
/* page 51 0x5B21-0x5B7E */
-static uint16 tab_jisx0212_uni51[]={
+static const uint16 tab_jisx0212_uni51[]={
0x8728,0x872E,0x872F,0x8731,0x8732,0x8739,0x873A,0x873C,
0x873D,0x873E,0x8740,0x8743,0x8745,0x874D,0x8758,0x875D,
0x8761,0x8764,0x8765,0x876F,0x8771,0x8772,0x877B,0x8783,
@@ -7943,7 +7943,7 @@ static uint16 tab_jisx0212_uni51[]={
0x8828,0x882D,0x882E,0x8830,0x8832,0x8835};
/* page 52 0x5C21-0x5C7E */
-static uint16 tab_jisx0212_uni52[]={
+static const uint16 tab_jisx0212_uni52[]={
0x883A,0x883C,0x8841,0x8843,0x8845,0x8848,0x8849,0x884A,
0x884B,0x884E,0x8851,0x8855,0x8856,0x8858,0x885A,0x885C,
0x885F,0x8860,0x8864,0x8869,0x8871,0x8879,0x887B,0x8880,
@@ -7958,7 +7958,7 @@ static uint16 tab_jisx0212_uni52[]={
0x896B,0x896E,0x8970,0x8973,0x8975,0x897A};
/* page 53 0x5D21-0x5D7E */
-static uint16 tab_jisx0212_uni53[]={
+static const uint16 tab_jisx0212_uni53[]={
0x897B,0x897C,0x897D,0x8989,0x898D,0x8990,0x8994,0x8995,
0x899B,0x899C,0x899F,0x89A0,0x89A5,0x89B0,0x89B4,0x89B5,
0x89B6,0x89B7,0x89BC,0x89D4,0x89D5,0x89D6,0x89D7,0x89D8,
@@ -7973,7 +7973,7 @@ static uint16 tab_jisx0212_uni53[]={
0x8A9F,0x8AA7,0x8AA9,0x8AAE,0x8AAF,0x8AB3};
/* page 54 0x5E21-0x5E7E */
-static uint16 tab_jisx0212_uni54[]={
+static const uint16 tab_jisx0212_uni54[]={
0x8AB6,0x8AB7,0x8ABB,0x8ABE,0x8AC3,0x8AC6,0x8AC8,0x8AC9,
0x8ACA,0x8AD1,0x8AD3,0x8AD4,0x8AD5,0x8AD7,0x8ADD,0x8ADF,
0x8AEC,0x8AF0,0x8AF4,0x8AF5,0x8AF6,0x8AFC,0x8AFF,0x8B05,
@@ -7988,7 +7988,7 @@ static uint16 tab_jisx0212_uni54[]={
0x8C73,0x8C75,0x8C76,0x8C7B,0x8C7E,0x8C86};
/* page 55 0x5F21-0x5F7E */
-static uint16 tab_jisx0212_uni55[]={
+static const uint16 tab_jisx0212_uni55[]={
0x8C87,0x8C8B,0x8C90,0x8C92,0x8C93,0x8C99,0x8C9B,0x8C9C,
0x8CA4,0x8CB9,0x8CBA,0x8CC5,0x8CC6,0x8CC9,0x8CCB,0x8CCF,
0x8CD6,0x8CD5,0x8CD9,0x8CDD,0x8CE1,0x8CE8,0x8CEC,0x8CEF,
@@ -8003,7 +8003,7 @@ static uint16 tab_jisx0212_uni55[]={
0x8E11,0x8E14,0x8E16,0x8E20,0x8E21,0x8E22};
/* page 56 0x6021-0x607E */
-static uint16 tab_jisx0212_uni56[]={
+static const uint16 tab_jisx0212_uni56[]={
0x8E23,0x8E26,0x8E27,0x8E31,0x8E33,0x8E36,0x8E37,0x8E38,
0x8E39,0x8E3D,0x8E40,0x8E41,0x8E4B,0x8E4D,0x8E4E,0x8E4F,
0x8E54,0x8E5B,0x8E5C,0x8E5D,0x8E5E,0x8E61,0x8E62,0x8E69,
@@ -8018,7 +8018,7 @@ static uint16 tab_jisx0212_uni56[]={
0x8F35,0x8F36,0x8F37,0x8F3A,0x8F40,0x8F41};
/* page 57 0x6121-0x617E */
-static uint16 tab_jisx0212_uni57[]={
+static const uint16 tab_jisx0212_uni57[]={
0x8F43,0x8F47,0x8F4F,0x8F51,0x8F52,0x8F53,0x8F54,0x8F55,
0x8F58,0x8F5D,0x8F5E,0x8F65,0x8F9D,0x8FA0,0x8FA1,0x8FA4,
0x8FA5,0x8FA6,0x8FB5,0x8FB6,0x8FB8,0x8FBE,0x8FC0,0x8FC1,
@@ -8033,7 +8033,7 @@ static uint16 tab_jisx0212_uni57[]={
0x90B4,0x90B6,0x90BD,0x90CC,0x90BE,0x90C3};
/* page 58 0x6221-0x627E */
-static uint16 tab_jisx0212_uni58[]={
+static const uint16 tab_jisx0212_uni58[]={
0x90C4,0x90C5,0x90C7,0x90C8,0x90D5,0x90D7,0x90D8,0x90D9,
0x90DC,0x90DD,0x90DF,0x90E5,0x90D2,0x90F6,0x90EB,0x90EF,
0x90F0,0x90F4,0x90FE,0x90FF,0x9100,0x9104,0x9105,0x9106,
@@ -8048,7 +8048,7 @@ static uint16 tab_jisx0212_uni58[]={
0x91B3,0x91B6,0x91BB,0x91BC,0x91BD,0x91BF};
/* page 59 0x6321-0x637E */
-static uint16 tab_jisx0212_uni59[]={
+static const uint16 tab_jisx0212_uni59[]={
0x91C2,0x91C3,0x91C5,0x91D3,0x91D4,0x91D7,0x91D9,0x91DA,
0x91DE,0x91E4,0x91E5,0x91E9,0x91EA,0x91EC,0x91ED,0x91EE,
0x91EF,0x91F0,0x91F1,0x91F7,0x91F9,0x91FB,0x91FD,0x9200,
@@ -8063,7 +8063,7 @@ static uint16 tab_jisx0212_uni59[]={
0x9289,0x928A,0x928D,0x928E,0x9292,0x9297};
/* page 60 0x6421-0x647E */
-static uint16 tab_jisx0212_uni60[]={
+static const uint16 tab_jisx0212_uni60[]={
0x9299,0x929F,0x92A0,0x92A4,0x92A5,0x92A7,0x92A8,0x92AB,
0x92AF,0x92B2,0x92B6,0x92B8,0x92BA,0x92BB,0x92BC,0x92BD,
0x92BF,0x92C0,0x92C1,0x92C2,0x92C3,0x92C5,0x92C6,0x92C7,
@@ -8078,7 +8078,7 @@ static uint16 tab_jisx0212_uni60[]={
0x936F,0x9370,0x9371,0x9373,0x9374,0x9376};
/* page 61 0x6521-0x657E */
-static uint16 tab_jisx0212_uni61[]={
+static const uint16 tab_jisx0212_uni61[]={
0x937A,0x937D,0x937F,0x9380,0x9381,0x9382,0x9388,0x938A,
0x938B,0x938D,0x938F,0x9392,0x9395,0x9398,0x939B,0x939E,
0x93A1,0x93A3,0x93A4,0x93A6,0x93A8,0x93AB,0x93B4,0x93B5,
@@ -8093,7 +8093,7 @@ static uint16 tab_jisx0212_uni61[]={
0x9471,0x9472,0x9484,0x9483,0x9578,0x9579};
/* page 62 0x6621-0x667E */
-static uint16 tab_jisx0212_uni62[]={
+static const uint16 tab_jisx0212_uni62[]={
0x957E,0x9584,0x9588,0x958C,0x958D,0x958E,0x959D,0x959E,
0x959F,0x95A1,0x95A6,0x95A9,0x95AB,0x95AC,0x95B4,0x95B6,
0x95BA,0x95BD,0x95BF,0x95C6,0x95C8,0x95C9,0x95CB,0x95D0,
@@ -8108,7 +8108,7 @@ static uint16 tab_jisx0212_uni62[]={
0x96DF,0x96E9,0x96EF,0x96F1,0x96FA,0x9702};
/* page 63 0x6721-0x677E */
-static uint16 tab_jisx0212_uni63[]={
+static const uint16 tab_jisx0212_uni63[]={
0x9703,0x9705,0x9709,0x971A,0x971B,0x971D,0x9721,0x9722,
0x9723,0x9728,0x9731,0x9733,0x9741,0x9743,0x974A,0x974E,
0x974F,0x9755,0x9757,0x9758,0x975A,0x975B,0x9763,0x9767,
@@ -8123,7 +8123,7 @@ static uint16 tab_jisx0212_uni63[]={
0x9816,0x981C,0x981E,0x9820,0x9823,0x9826};
/* page 64 0x6821-0x687E */
-static uint16 tab_jisx0212_uni64[]={
+static const uint16 tab_jisx0212_uni64[]={
0x982B,0x982E,0x982F,0x9830,0x9832,0x9833,0x9835,0x9825,
0x983E,0x9844,0x9847,0x984A,0x9851,0x9852,0x9853,0x9856,
0x9857,0x9859,0x985A,0x9862,0x9863,0x9865,0x9866,0x986A,
@@ -8138,7 +8138,7 @@ static uint16 tab_jisx0212_uni64[]={
0x999F,0x99A6,0x99B0,0x99B1,0x99B2,0x99B5};
/* page 65 0x6921-0x697E */
-static uint16 tab_jisx0212_uni65[]={
+static const uint16 tab_jisx0212_uni65[]={
0x99B9,0x99BA,0x99BD,0x99BF,0x99C3,0x99C9,0x99D3,0x99D4,
0x99D9,0x99DA,0x99DC,0x99DE,0x99E7,0x99EA,0x99EB,0x99EC,
0x99F0,0x99F4,0x99F5,0x99F9,0x99FD,0x99FE,0x9A02,0x9A03,
@@ -8153,7 +8153,7 @@ static uint16 tab_jisx0212_uni65[]={
0x9AFD,0x9AFF,0x9B00,0x9B01,0x9B02,0x9B03};
/* page 66 0x6A21-0x6A7E */
-static uint16 tab_jisx0212_uni66[]={
+static const uint16 tab_jisx0212_uni66[]={
0x9B04,0x9B05,0x9B08,0x9B09,0x9B0B,0x9B0C,0x9B0D,0x9B0E,
0x9B10,0x9B12,0x9B16,0x9B19,0x9B1B,0x9B1C,0x9B20,0x9B26,
0x9B2B,0x9B2D,0x9B33,0x9B34,0x9B35,0x9B37,0x9B39,0x9B3A,
@@ -8168,7 +8168,7 @@ static uint16 tab_jisx0212_uni66[]={
0x9BEA,0x9BEB,0x9BEF,0x9BF3,0x9BF7,0x9BF8};
/* page 67 0x6B21-0x6B7E */
-static uint16 tab_jisx0212_uni67[]={
+static const uint16 tab_jisx0212_uni67[]={
0x9BF9,0x9BFA,0x9BFD,0x9BFF,0x9C00,0x9C02,0x9C0B,0x9C0F,
0x9C11,0x9C16,0x9C18,0x9C19,0x9C1A,0x9C1C,0x9C1E,0x9C22,
0x9C23,0x9C26,0x9C27,0x9C28,0x9C29,0x9C2A,0x9C31,0x9C35,
@@ -8183,7 +8183,7 @@ static uint16 tab_jisx0212_uni67[]={
0x9D6A,0x9D6B,0x9D70,0x9D76,0x9D77,0x9D7B};
/* page 68 0x6C21-0x6C7E */
-static uint16 tab_jisx0212_uni68[]={
+static const uint16 tab_jisx0212_uni68[]={
0x9D7C,0x9D7E,0x9D83,0x9D84,0x9D86,0x9D8A,0x9D8D,0x9D8E,
0x9D92,0x9D93,0x9D95,0x9D96,0x9D97,0x9D98,0x9DA1,0x9DAA,
0x9DAC,0x9DAE,0x9DB1,0x9DB5,0x9DB9,0x9DBC,0x9DBF,0x9DC3,
@@ -8198,7 +8198,7 @@ static uint16 tab_jisx0212_uni68[]={
0x9EED,0x9EEE,0x9EF0,0x9EF1,0x9EF2,0x9EF5};
/* page 69 0x6D21-0x6D63 */
-static uint16 tab_jisx0212_uni69[]={
+static const uint16 tab_jisx0212_uni69[]={
0x9EF8,0x9EFF,0x9F02,0x9F03,0x9F09,0x9F0F,0x9F10,0x9F11,
0x9F12,0x9F14,0x9F16,0x9F17,0x9F19,0x9F1A,0x9F1B,0x9F1F,
0x9F22,0x9F26,0x9F2A,0x9F2B,0x9F2F,0x9F31,0x9F32,0x9F34,
@@ -8210,12 +8210,12 @@ static uint16 tab_jisx0212_uni69[]={
0x9FA2,0x9FA3,0x9FA5};
/* page 70 0x7371-0x737E IBM Kanji and Nonkanji */
-static uint16 tab_jisx0212_uni70[]={
+static const uint16 tab_jisx0212_uni70[]={
0, 0,0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,
0x2176,0x2177,0x2178,0x2179,0x2160,0x2161};
/* page 71 0x7421-0x747E IBM Kanji and Nonkanji*/
-static uint16 tab_jisx0212_uni71[]={
+static const uint16 tab_jisx0212_uni71[]={
0x2162,0x2163,0x2164,0x2165,0x2166,0x2167,0x2168,0x2169,
0xFF07,0xFF02,0x3231,0x2116,0x2121,0x70BB,0x4EFC,0x50F4,
0x51EC,0x5307,0x5324,0xFA0E,0x548A,0x5759,0xFA0F,0xFA10,
@@ -8685,7 +8685,7 @@ static MY_CHARSET_HANDLER my_charset_han
-CHARSET_INFO my_charset_eucjpms_japanese_ci=
+struct charset_info_st my_charset_eucjpms_japanese_ci=
{
97,0,0, /* number */
MY_CS_COMPILED|MY_CS_PRIMARY, /* state */
@@ -8718,7 +8718,7 @@ CHARSET_INFO my_charset_eucjpms_japanese
};
-CHARSET_INFO my_charset_eucjpms_bin=
+struct charset_info_st my_charset_eucjpms_bin=
{
98,0,0, /* number */
MY_CS_COMPILED|MY_CS_BINSORT, /* state */
=== modified file 'strings/ctype-extra.c'
--- a/strings/ctype-extra.c 2009-07-02 10:15:33 +0000
+++ b/strings/ctype-extra.c 2010-01-06 19:20:16 +0000
@@ -6,7 +6,7 @@
./conf_to_src ../sql/share/charsets/ > FILE
*/
-/* Copyright (C) 2000-2007 MySQL AB
+/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
#include <m_ctype.h>
#ifdef HAVE_CHARSET_dec8
-uchar ctype_dec8_swedish_ci[] = {
+static const uchar ctype_dec8_swedish_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -45,7 +45,7 @@ uchar ctype_dec8_swedish_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_dec8_swedish_ci[] = {
+static const uchar to_lower_dec8_swedish_ci[] = {
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,
@@ -64,7 +64,7 @@ uchar to_lower_dec8_swedish_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_dec8_swedish_ci[] = {
+static const uchar to_upper_dec8_swedish_ci[] = {
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,
@@ -83,7 +83,7 @@ uchar to_upper_dec8_swedish_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_dec8_swedish_ci[] = {
+static const uchar sort_order_dec8_swedish_ci[] = {
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,
@@ -102,7 +102,7 @@ uchar sort_order_dec8_swedish_ci[] = {
0x44,0x4E,0x4F,0x4F,0x4F,0x4F,0x5D,0xF7,0xD8,0x55,0x55,0x55,0x59,0x59,0xDE,0xFF
};
-uint16 to_uni_dec8_swedish_ci[] = {
+static const uint16 to_uni_dec8_swedish_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -140,7 +140,7 @@ uint16 to_uni_dec8_swedish_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp850
-uchar ctype_cp850_general_ci[] = {
+static const uchar ctype_cp850_general_ci[] = {
0x00,
0x20,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x30,0x30,
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x30,0x30,0x30,0x30,0x30,
@@ -160,7 +160,7 @@ uchar ctype_cp850_general_ci[] = {
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20
};
-uchar to_lower_cp850_general_ci[] = {
+static const uchar to_lower_cp850_general_ci[] = {
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,
@@ -179,7 +179,7 @@ uchar to_lower_cp850_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp850_general_ci[] = {
+static const uchar to_upper_cp850_general_ci[] = {
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,
@@ -198,7 +198,7 @@ uchar to_upper_cp850_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_cp850_general_ci[] = {
+static const uchar sort_order_cp850_general_ci[] = {
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,
@@ -217,7 +217,7 @@ uchar sort_order_cp850_general_ci[] = {
0xED,0xF1,0xC1,0xFE,0xF6,0xE7,0xBF,0xBC,0xF0,0xE8,0xF7,0xF9,0xF3,0xF2,0xDF,0xE0
};
-uint16 to_uni_cp850_general_ci[] = {
+static const uint16 to_uni_cp850_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -255,7 +255,7 @@ uint16 to_uni_cp850_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin1
-uchar ctype_latin1_german1_ci[] = {
+static const uchar ctype_latin1_german1_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -275,7 +275,7 @@ uchar ctype_latin1_german1_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_latin1_german1_ci[] = {
+static const uchar to_lower_latin1_german1_ci[] = {
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,
@@ -294,7 +294,7 @@ uchar to_lower_latin1_german1_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin1_german1_ci[] = {
+static const uchar to_upper_latin1_german1_ci[] = {
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,
@@ -313,7 +313,7 @@ uchar to_upper_latin1_german1_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin1_german1_ci[] = {
+static const uchar sort_order_latin1_german1_ci[] = {
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,
@@ -332,7 +332,7 @@ uchar sort_order_latin1_german1_ci[] = {
0xD0,0x4E,0x4F,0x4F,0x4F,0x4F,0x4F,0xF7,0x4F,0x55,0x55,0x55,0x55,0x59,0xDE,0xFF
};
-uint16 to_uni_latin1_german1_ci[] = {
+static const uint16 to_uni_latin1_german1_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -370,7 +370,7 @@ uint16 to_uni_latin1_german1_ci[] = {
#endif
#ifdef HAVE_CHARSET_hp8
-uchar ctype_hp8_english_ci[] = {
+static const uchar ctype_hp8_english_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -390,7 +390,7 @@ uchar ctype_hp8_english_ci[] = {
0x10,0x10,0x20,0x20,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20
};
-uchar to_lower_hp8_english_ci[] = {
+static const uchar to_lower_hp8_english_ci[] = {
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,
@@ -409,7 +409,7 @@ uchar to_lower_hp8_english_ci[] = {
0xF1,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_hp8_english_ci[] = {
+static const uchar to_upper_hp8_english_ci[] = {
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,
@@ -428,7 +428,7 @@ uchar to_upper_hp8_english_ci[] = {
0xF0,0xF0,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_hp8_english_ci[] = {
+static const uchar sort_order_hp8_english_ci[] = {
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,
@@ -447,7 +447,7 @@ uchar sort_order_hp8_english_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_hp8_english_ci[] = {
+static const uint16 to_uni_hp8_english_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -485,7 +485,7 @@ uint16 to_uni_hp8_english_ci[] = {
#endif
#ifdef HAVE_CHARSET_koi8r
-uchar ctype_koi8r_general_ci[] = {
+static const uchar ctype_koi8r_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -505,7 +505,7 @@ uchar ctype_koi8r_general_ci[] = {
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01
};
-uchar to_lower_koi8r_general_ci[] = {
+static const uchar to_lower_koi8r_general_ci[] = {
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,
@@ -524,7 +524,7 @@ uchar to_lower_koi8r_general_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
};
-uchar to_upper_koi8r_general_ci[] = {
+static const uchar to_upper_koi8r_general_ci[] = {
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,
@@ -543,7 +543,7 @@ uchar to_upper_koi8r_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_koi8r_general_ci[] = {
+static const uchar sort_order_koi8r_general_ci[] = {
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,
@@ -562,7 +562,7 @@ uchar sort_order_koi8r_general_ci[] = {
0xEF,0xFF,0xF0,0xF1,0xF2,0xF3,0xE6,0xE1,0xFC,0xFB,0xE7,0xF8,0xFD,0xF9,0xF7,0xFA
};
-uint16 to_uni_koi8r_general_ci[] = {
+static const uint16 to_uni_koi8r_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -600,7 +600,7 @@ uint16 to_uni_koi8r_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin2
-uchar ctype_latin2_general_ci[] = {
+static const uchar ctype_latin2_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -620,7 +620,7 @@ uchar ctype_latin2_general_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_latin2_general_ci[] = {
+static const uchar to_lower_latin2_general_ci[] = {
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,
@@ -639,7 +639,7 @@ uchar to_lower_latin2_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin2_general_ci[] = {
+static const uchar to_upper_latin2_general_ci[] = {
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,
@@ -658,7 +658,7 @@ uchar to_upper_latin2_general_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin2_general_ci[] = {
+static const uchar sort_order_latin2_general_ci[] = {
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,
@@ -677,7 +677,7 @@ uchar sort_order_latin2_general_ci[] = {
0xFF,0x55,0x54,0x57,0x56,0x56,0x56,0xFF,0x5A,0x5F,0x5F,0x5F,0x5F,0x63,0x5E,0xFF
};
-uint16 to_uni_latin2_general_ci[] = {
+static const uint16 to_uni_latin2_general_ci[] = {
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 @@ uint16 to_uni_latin2_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_swe7
-uchar ctype_swe7_swedish_ci[] = {
+static const uchar ctype_swe7_swedish_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -735,7 +735,7 @@ uchar ctype_swe7_swedish_ci[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-uchar to_lower_swe7_swedish_ci[] = {
+static const uchar to_lower_swe7_swedish_ci[] = {
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,
@@ -754,7 +754,7 @@ uchar to_lower_swe7_swedish_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_swe7_swedish_ci[] = {
+static const uchar to_upper_swe7_swedish_ci[] = {
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,
@@ -773,7 +773,7 @@ uchar to_upper_swe7_swedish_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_swe7_swedish_ci[] = {
+static const uchar sort_order_swe7_swedish_ci[] = {
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,
@@ -792,7 +792,7 @@ uchar sort_order_swe7_swedish_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_swe7_swedish_ci[] = {
+static const uint16 to_uni_swe7_swedish_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -830,7 +830,7 @@ uint16 to_uni_swe7_swedish_ci[] = {
#endif
#ifdef HAVE_CHARSET_ascii
-uchar ctype_ascii_general_ci[] = {
+static const uchar ctype_ascii_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -850,7 +850,7 @@ uchar ctype_ascii_general_ci[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-uchar to_lower_ascii_general_ci[] = {
+static const uchar to_lower_ascii_general_ci[] = {
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,
@@ -869,7 +869,7 @@ uchar to_lower_ascii_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_ascii_general_ci[] = {
+static const uchar to_upper_ascii_general_ci[] = {
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,
@@ -888,7 +888,7 @@ uchar to_upper_ascii_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_ascii_general_ci[] = {
+static const uchar sort_order_ascii_general_ci[] = {
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,
@@ -907,7 +907,7 @@ uchar sort_order_ascii_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_ascii_general_ci[] = {
+static const uint16 to_uni_ascii_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -945,7 +945,7 @@ uint16 to_uni_ascii_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1251
-uchar ctype_cp1251_bulgarian_ci[] = {
+static const uchar ctype_cp1251_bulgarian_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -965,7 +965,7 @@ uchar ctype_cp1251_bulgarian_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_cp1251_bulgarian_ci[] = {
+static const uchar to_lower_cp1251_bulgarian_ci[] = {
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,
@@ -984,7 +984,7 @@ uchar to_lower_cp1251_bulgarian_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1251_bulgarian_ci[] = {
+static const uchar to_upper_cp1251_bulgarian_ci[] = {
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,
@@ -1003,7 +1003,7 @@ uchar to_upper_cp1251_bulgarian_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
};
-uchar sort_order_cp1251_bulgarian_ci[] = {
+static const uchar sort_order_cp1251_bulgarian_ci[] = {
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,
@@ -1022,7 +1022,7 @@ uchar sort_order_cp1251_bulgarian_ci[] =
0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B
};
-uint16 to_uni_cp1251_bulgarian_ci[] = {
+static const uint16 to_uni_cp1251_bulgarian_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -1060,7 +1060,7 @@ uint16 to_uni_cp1251_bulgarian_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin1
-uchar ctype_latin1_danish_ci[] = {
+static const uchar ctype_latin1_danish_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -1080,7 +1080,7 @@ uchar ctype_latin1_danish_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_latin1_danish_ci[] = {
+static const uchar to_lower_latin1_danish_ci[] = {
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,
@@ -1099,7 +1099,7 @@ uchar to_lower_latin1_danish_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin1_danish_ci[] = {
+static const uchar to_upper_latin1_danish_ci[] = {
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,
@@ -1118,7 +1118,7 @@ uchar to_upper_latin1_danish_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin1_danish_ci[] = {
+static const uchar sort_order_latin1_danish_ci[] = {
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,
@@ -1137,7 +1137,7 @@ uchar sort_order_latin1_danish_ci[] = {
0x44,0x4E,0x4F,0x4F,0x4F,0x4F,0x5C,0xF7,0x5C,0x55,0x55,0x55,0x59,0x59,0xDE,0xFF
};
-uint16 to_uni_latin1_danish_ci[] = {
+static const uint16 to_uni_latin1_danish_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -1175,7 +1175,7 @@ uint16 to_uni_latin1_danish_ci[] = {
#endif
#ifdef HAVE_CHARSET_hebrew
-uchar ctype_hebrew_general_ci[] = {
+static const uchar ctype_hebrew_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -1195,7 +1195,7 @@ uchar ctype_hebrew_general_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00
};
-uchar to_lower_hebrew_general_ci[] = {
+static const uchar to_lower_hebrew_general_ci[] = {
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,
@@ -1214,7 +1214,7 @@ uchar to_lower_hebrew_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_hebrew_general_ci[] = {
+static const uchar to_upper_hebrew_general_ci[] = {
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,
@@ -1233,7 +1233,7 @@ uchar to_upper_hebrew_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_hebrew_general_ci[] = {
+static const uchar sort_order_hebrew_general_ci[] = {
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,
@@ -1252,7 +1252,7 @@ uchar sort_order_hebrew_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_hebrew_general_ci[] = {
+static const uint16 to_uni_hebrew_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -1290,7 +1290,7 @@ uint16 to_uni_hebrew_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin7
-uchar ctype_latin7_estonian_cs[] = {
+static const uchar ctype_latin7_estonian_cs[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -1310,7 +1310,7 @@ uchar ctype_latin7_estonian_cs[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_latin7_estonian_cs[] = {
+static const uchar to_lower_latin7_estonian_cs[] = {
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,
@@ -1329,7 +1329,7 @@ uchar to_lower_latin7_estonian_cs[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin7_estonian_cs[] = {
+static const uchar to_upper_latin7_estonian_cs[] = {
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,
@@ -1348,7 +1348,7 @@ uchar to_upper_latin7_estonian_cs[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin7_estonian_cs[] = {
+static const uchar sort_order_latin7_estonian_cs[] = {
0x00,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x2E,0x2F,0x30,0x31,0x32,0x0A,0x0B,
0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,
0x2C,0x33,0x34,0x35,0x36,0x37,0x38,0x27,0x39,0x3A,0x3B,0x5D,0x3C,0x28,0x3D,0x3E,
@@ -1367,7 +1367,7 @@ uchar sort_order_latin7_estonian_cs[] =
0xDC,0xC3,0xC5,0xC9,0xCB,0xF3,0xF7,0x65,0xED,0xBD,0xD9,0xEB,0xF9,0xE2,0xE4,0x53
};
-uint16 to_uni_latin7_estonian_cs[] = {
+static const uint16 to_uni_latin7_estonian_cs[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -1405,7 +1405,7 @@ uint16 to_uni_latin7_estonian_cs[] = {
#endif
#ifdef HAVE_CHARSET_latin2
-uchar ctype_latin2_hungarian_ci[] = {
+static const uchar ctype_latin2_hungarian_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -1425,7 +1425,7 @@ uchar ctype_latin2_hungarian_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_latin2_hungarian_ci[] = {
+static const uchar to_lower_latin2_hungarian_ci[] = {
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,
@@ -1444,7 +1444,7 @@ uchar to_lower_latin2_hungarian_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin2_hungarian_ci[] = {
+static const uchar to_upper_latin2_hungarian_ci[] = {
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,
@@ -1463,7 +1463,7 @@ uchar to_upper_latin2_hungarian_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin2_hungarian_ci[] = {
+static const uchar sort_order_latin2_hungarian_ci[] = {
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,
@@ -1482,7 +1482,7 @@ uchar sort_order_latin2_hungarian_ci[] =
0xFF,0x62,0x63,0x64,0x66,0x67,0x67,0xFF,0x6D,0x77,0x75,0x78,0x78,0x7E,0x74,0xFF
};
-uint16 to_uni_latin2_hungarian_ci[] = {
+static const uint16 to_uni_latin2_hungarian_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -1520,7 +1520,7 @@ uint16 to_uni_latin2_hungarian_ci[] = {
#endif
#ifdef HAVE_CHARSET_koi8u
-uchar ctype_koi8u_general_ci[] = {
+static const uchar ctype_koi8u_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -1540,7 +1540,7 @@ uchar ctype_koi8u_general_ci[] = {
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01
};
-uchar to_lower_koi8u_general_ci[] = {
+static const uchar to_lower_koi8u_general_ci[] = {
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,
@@ -1559,7 +1559,7 @@ uchar to_lower_koi8u_general_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
};
-uchar to_upper_koi8u_general_ci[] = {
+static const uchar to_upper_koi8u_general_ci[] = {
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,
@@ -1578,7 +1578,7 @@ uchar to_upper_koi8u_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_koi8u_general_ci[] = {
+static const uchar sort_order_koi8u_general_ci[] = {
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,
@@ -1597,7 +1597,7 @@ uchar sort_order_koi8u_general_ci[] = {
0x94,0xA4,0x95,0x96,0x97,0x98,0x89,0x82,0xA1,0xA0,0x8A,0x9D,0xA2,0x9E,0x9C,0x9F
};
-uint16 to_uni_koi8u_general_ci[] = {
+static const uint16 to_uni_koi8u_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -1635,7 +1635,7 @@ uint16 to_uni_koi8u_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1251
-uchar ctype_cp1251_ukrainian_ci[] = {
+static const uchar ctype_cp1251_ukrainian_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -1655,7 +1655,7 @@ uchar ctype_cp1251_ukrainian_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_cp1251_ukrainian_ci[] = {
+static const uchar to_lower_cp1251_ukrainian_ci[] = {
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,
@@ -1674,7 +1674,7 @@ uchar to_lower_cp1251_ukrainian_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1251_ukrainian_ci[] = {
+static const uchar to_upper_cp1251_ukrainian_ci[] = {
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,
@@ -1693,7 +1693,7 @@ uchar to_upper_cp1251_ukrainian_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
};
-uchar sort_order_cp1251_ukrainian_ci[] = {
+static const uchar sort_order_cp1251_ukrainian_ci[] = {
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,
@@ -1712,7 +1712,7 @@ uchar sort_order_cp1251_ukrainian_ci[] =
0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4
};
-uint16 to_uni_cp1251_ukrainian_ci[] = {
+static const uint16 to_uni_cp1251_ukrainian_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -1750,7 +1750,7 @@ uint16 to_uni_cp1251_ukrainian_ci[] = {
#endif
#ifdef HAVE_CHARSET_greek
-uchar ctype_greek_general_ci[] = {
+static const uchar ctype_greek_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -1770,7 +1770,7 @@ uchar ctype_greek_general_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00
};
-uchar to_lower_greek_general_ci[] = {
+static const uchar to_lower_greek_general_ci[] = {
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,
@@ -1789,7 +1789,7 @@ uchar to_lower_greek_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_greek_general_ci[] = {
+static const uchar to_upper_greek_general_ci[] = {
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,
@@ -1808,7 +1808,7 @@ uchar to_upper_greek_general_ci[] = {
0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xCF,0xD5,0xD9,0xFF
};
-uchar sort_order_greek_general_ci[] = {
+static const uchar sort_order_greek_general_ci[] = {
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,
@@ -1827,7 +1827,7 @@ uchar sort_order_greek_general_ci[] = {
0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xC9,0xD5,0xCF,0xD5,0xD9,0xFF
};
-uint16 to_uni_greek_general_ci[] = {
+static const uint16 to_uni_greek_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -1865,7 +1865,7 @@ uint16 to_uni_greek_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1250
-uchar ctype_cp1250_general_ci[] = {
+static const uchar ctype_cp1250_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -1885,7 +1885,7 @@ uchar ctype_cp1250_general_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_cp1250_general_ci[] = {
+static const uchar to_lower_cp1250_general_ci[] = {
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,
@@ -1904,7 +1904,7 @@ uchar to_lower_cp1250_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1250_general_ci[] = {
+static const uchar to_upper_cp1250_general_ci[] = {
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,
@@ -1923,7 +1923,7 @@ uchar to_upper_cp1250_general_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_cp1250_general_ci[] = {
+static const uchar sort_order_cp1250_general_ci[] = {
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,
@@ -1942,7 +1942,7 @@ uchar sort_order_cp1250_general_ci[] = {
0x47,0x53,0x53,0x55,0x55,0x55,0x55,0xF7,0x58,0x5C,0x5C,0x5C,0x5C,0x60,0x5B,0xFF
};
-uint16 to_uni_cp1250_general_ci[] = {
+static const uint16 to_uni_cp1250_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -1980,7 +1980,7 @@ uint16 to_uni_cp1250_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin2
-uchar ctype_latin2_croatian_ci[] = {
+static const uchar ctype_latin2_croatian_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -2000,7 +2000,7 @@ uchar ctype_latin2_croatian_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_latin2_croatian_ci[] = {
+static const uchar to_lower_latin2_croatian_ci[] = {
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,
@@ -2019,7 +2019,7 @@ uchar to_lower_latin2_croatian_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin2_croatian_ci[] = {
+static const uchar to_upper_latin2_croatian_ci[] = {
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,
@@ -2038,7 +2038,7 @@ uchar to_upper_latin2_croatian_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin2_croatian_ci[] = {
+static const uchar sort_order_latin2_croatian_ci[] = {
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,
@@ -2057,7 +2057,7 @@ uchar sort_order_latin2_croatian_ci[] =
0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xFE,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF
};
-uint16 to_uni_latin2_croatian_ci[] = {
+static const uint16 to_uni_latin2_croatian_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -2095,7 +2095,7 @@ uint16 to_uni_latin2_croatian_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1257
-uchar ctype_cp1257_lithuanian_ci[] = {
+static const uchar ctype_cp1257_lithuanian_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -2115,7 +2115,7 @@ uchar ctype_cp1257_lithuanian_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00
};
-uchar to_lower_cp1257_lithuanian_ci[] = {
+static const uchar to_lower_cp1257_lithuanian_ci[] = {
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,
@@ -2134,7 +2134,7 @@ uchar to_lower_cp1257_lithuanian_ci[] =
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1257_lithuanian_ci[] = {
+static const uchar to_upper_cp1257_lithuanian_ci[] = {
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,
@@ -2153,7 +2153,7 @@ uchar to_upper_cp1257_lithuanian_ci[] =
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_cp1257_lithuanian_ci[] = {
+static const uchar sort_order_cp1257_lithuanian_ci[] = {
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,
@@ -2172,7 +2172,7 @@ uchar sort_order_cp1257_lithuanian_ci[]
0x5A,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x5E,0xFF,0xFF,0x5D,0xFF,0xFF,0xFF,0xFF
};
-uint16 to_uni_cp1257_lithuanian_ci[] = {
+static const uint16 to_uni_cp1257_lithuanian_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -2210,7 +2210,7 @@ uint16 to_uni_cp1257_lithuanian_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin5
-uchar ctype_latin5_turkish_ci[] = {
+static const uchar ctype_latin5_turkish_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -2230,7 +2230,7 @@ uchar ctype_latin5_turkish_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_latin5_turkish_ci[] = {
+static const uchar to_lower_latin5_turkish_ci[] = {
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,
@@ -2249,7 +2249,7 @@ uchar to_lower_latin5_turkish_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin5_turkish_ci[] = {
+static const uchar to_upper_latin5_turkish_ci[] = {
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,
@@ -2268,7 +2268,7 @@ uchar to_upper_latin5_turkish_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0x49,0xDE,0xFF
};
-uchar sort_order_latin5_turkish_ci[] = {
+static const uchar sort_order_latin5_turkish_ci[] = {
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,
@@ -2287,7 +2287,7 @@ uchar sort_order_latin5_turkish_ci[] = {
0x49,0x51,0x52,0x52,0x52,0x52,0x53,0xFA,0x52,0x5A,0x5A,0x5A,0x5B,0x4B,0x58,0x5F
};
-uint16 to_uni_latin5_turkish_ci[] = {
+static const uint16 to_uni_latin5_turkish_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -2325,7 +2325,7 @@ uint16 to_uni_latin5_turkish_ci[] = {
#endif
#ifdef HAVE_CHARSET_armscii8
-uchar ctype_armscii8_general_ci[] = {
+static const uchar ctype_armscii8_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -2345,7 +2345,7 @@ uchar ctype_armscii8_general_ci[] = {
0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x10,0x10
};
-uchar to_lower_armscii8_general_ci[] = {
+static const uchar to_lower_armscii8_general_ci[] = {
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,
@@ -2364,7 +2364,7 @@ uchar to_lower_armscii8_general_ci[] = {
0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFB,0xFB,0xFD,0xFD,0xFE,0xFF
};
-uchar to_upper_armscii8_general_ci[] = {
+static const uchar to_upper_armscii8_general_ci[] = {
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,
@@ -2383,7 +2383,7 @@ uchar to_upper_armscii8_general_ci[] = {
0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFE,0xFF
};
-uchar sort_order_armscii8_general_ci[] = {
+static const uchar sort_order_armscii8_general_ci[] = {
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,
@@ -2402,7 +2402,7 @@ uchar sort_order_armscii8_general_ci[] =
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_armscii8_general_ci[] = {
+static const uint16 to_uni_armscii8_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -2440,7 +2440,7 @@ uint16 to_uni_armscii8_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp866
-uchar ctype_cp866_general_ci[] = {
+static const uchar ctype_cp866_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -2460,7 +2460,7 @@ uchar ctype_cp866_general_ci[] = {
0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48
};
-uchar to_lower_cp866_general_ci[] = {
+static const uchar to_lower_cp866_general_ci[] = {
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,
@@ -2479,7 +2479,7 @@ uchar to_lower_cp866_general_ci[] = {
0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp866_general_ci[] = {
+static const uchar to_upper_cp866_general_ci[] = {
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,
@@ -2498,7 +2498,7 @@ uchar to_upper_cp866_general_ci[] = {
0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_cp866_general_ci[] = {
+static const uchar sort_order_cp866_general_ci[] = {
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,
@@ -2517,7 +2517,7 @@ uchar sort_order_cp866_general_ci[] = {
0x81,0x81,0x83,0x83,0x8B,0x8B,0xA3,0xA3,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2
};
-uint16 to_uni_cp866_general_ci[] = {
+static const uint16 to_uni_cp866_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -2555,7 +2555,7 @@ uint16 to_uni_cp866_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_keybcs2
-uchar ctype_keybcs2_general_ci[] = {
+static const uchar ctype_keybcs2_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -2575,7 +2575,7 @@ uchar ctype_keybcs2_general_ci[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48
};
-uchar to_lower_keybcs2_general_ci[] = {
+static const uchar to_lower_keybcs2_general_ci[] = {
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,
@@ -2594,7 +2594,7 @@ uchar to_lower_keybcs2_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_keybcs2_general_ci[] = {
+static const uchar to_upper_keybcs2_general_ci[] = {
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,
@@ -2613,7 +2613,7 @@ uchar to_upper_keybcs2_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_keybcs2_general_ci[] = {
+static const uchar sort_order_keybcs2_general_ci[] = {
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,
@@ -2632,7 +2632,7 @@ uchar sort_order_keybcs2_general_ci[] =
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_keybcs2_general_ci[] = {
+static const uint16 to_uni_keybcs2_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -2670,7 +2670,7 @@ uint16 to_uni_keybcs2_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_macce
-uchar ctype_macce_general_ci[] = {
+static const uchar ctype_macce_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -2690,7 +2690,7 @@ uchar ctype_macce_general_ci[] = {
0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x01,0x01,0x02,0x01,0x00
};
-uchar to_lower_macce_general_ci[] = {
+static const uchar to_lower_macce_general_ci[] = {
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,
@@ -2709,7 +2709,7 @@ uchar to_lower_macce_general_ci[] = {
0xF0,0xF3,0x9C,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFA,0xFD,0xB8,0xFD,0xAE,0xFF
};
-uchar to_upper_macce_general_ci[] = {
+static const uchar to_upper_macce_general_ci[] = {
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,
@@ -2728,7 +2728,7 @@ uchar to_upper_macce_general_ci[] = {
0xED,0xF1,0xF2,0xF1,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xB5,0xFB,0xFC,0xFB,0xFE,0xFF
};
-uchar sort_order_macce_general_ci[] = {
+static const uchar sort_order_macce_general_ci[] = {
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,
@@ -2747,7 +2747,7 @@ uchar sort_order_macce_general_ci[] = {
0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x8B,0x8B,0x5B,0x8D,0x5D,0x8D,0x53,0xFF
};
-uint16 to_uni_macce_general_ci[] = {
+static const uint16 to_uni_macce_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -2785,7 +2785,7 @@ uint16 to_uni_macce_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_macroman
-uchar ctype_macroman_general_ci[] = {
+static const uchar ctype_macroman_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -2805,7 +2805,7 @@ uchar ctype_macroman_general_ci[] = {
0x00,0x01,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-uchar to_lower_macroman_general_ci[] = {
+static const uchar to_lower_macroman_general_ci[] = {
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,
@@ -2824,7 +2824,7 @@ uchar to_lower_macroman_general_ci[] = {
0xF0,0x98,0x9C,0x9E,0x9D,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_macroman_general_ci[] = {
+static const uchar to_upper_macroman_general_ci[] = {
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,
@@ -2843,7 +2843,7 @@ uchar to_upper_macroman_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_macroman_general_ci[] = {
+static const uchar sort_order_macroman_general_ci[] = {
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,
@@ -2862,7 +2862,7 @@ uchar sort_order_macroman_general_ci[] =
0xF0,0x72,0x85,0x85,0x85,0x61,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_macroman_general_ci[] = {
+static const uint16 to_uni_macroman_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -2900,7 +2900,7 @@ uint16 to_uni_macroman_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp852
-uchar ctype_cp852_general_ci[] = {
+static const uchar ctype_cp852_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -2920,7 +2920,7 @@ uchar ctype_cp852_general_ci[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x00,0x48
};
-uchar to_lower_cp852_general_ci[] = {
+static const uchar to_lower_cp852_general_ci[] = {
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,
@@ -2939,7 +2939,7 @@ uchar to_lower_cp852_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp852_general_ci[] = {
+static const uchar to_upper_cp852_general_ci[] = {
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,
@@ -2958,7 +2958,7 @@ uchar to_upper_cp852_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF
};
-uchar sort_order_cp852_general_ci[] = {
+static const uchar sort_order_cp852_general_ci[] = {
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,
@@ -2977,7 +2977,7 @@ uchar sort_order_cp852_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0x74,0x69,0x69,0xFE,0xFF
};
-uint16 to_uni_cp852_general_ci[] = {
+static const uint16 to_uni_cp852_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -3015,7 +3015,7 @@ uint16 to_uni_cp852_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin7
-uchar ctype_latin7_general_ci[] = {
+static const uchar ctype_latin7_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -3035,7 +3035,7 @@ uchar ctype_latin7_general_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_latin7_general_ci[] = {
+static const uchar to_lower_latin7_general_ci[] = {
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,
@@ -3054,7 +3054,7 @@ uchar to_lower_latin7_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin7_general_ci[] = {
+static const uchar to_upper_latin7_general_ci[] = {
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,
@@ -3073,7 +3073,7 @@ uchar to_upper_latin7_general_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin7_general_ci[] = {
+static const uchar sort_order_latin7_general_ci[] = {
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,
0x30,0x32,0x33,0x34,0x35,0x36,0x37,0x2B,0x38,0x39,0x3A,0x5C,0x3B,0x2C,0x3C,0x3D,
@@ -3092,7 +3092,7 @@ uchar sort_order_latin7_general_ci[] = {
0xE1,0xC4,0xC6,0xCA,0xCE,0xD0,0xCC,0x64,0xEC,0xBC,0xDE,0xEA,0xE8,0xFA,0xFC,0x52
};
-uint16 to_uni_latin7_general_ci[] = {
+static const uint16 to_uni_latin7_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -3130,7 +3130,7 @@ uint16 to_uni_latin7_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin7
-uchar ctype_latin7_general_cs[] = {
+static const uchar ctype_latin7_general_cs[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -3150,7 +3150,7 @@ uchar ctype_latin7_general_cs[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_latin7_general_cs[] = {
+static const uchar to_lower_latin7_general_cs[] = {
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,
@@ -3169,7 +3169,7 @@ uchar to_lower_latin7_general_cs[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin7_general_cs[] = {
+static const uchar to_upper_latin7_general_cs[] = {
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,
@@ -3188,7 +3188,7 @@ uchar to_upper_latin7_general_cs[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin7_general_cs[] = {
+static const uchar sort_order_latin7_general_cs[] = {
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,
0x30,0x32,0x33,0x34,0x35,0x36,0x37,0x2B,0x38,0x39,0x3A,0x5C,0x3B,0x2C,0x3C,0x3D,
@@ -3207,7 +3207,7 @@ uchar sort_order_latin7_general_cs[] = {
0xE2,0xC5,0xC7,0xCB,0xCF,0xD1,0xCD,0x64,0xED,0xBD,0xDF,0xEB,0xE9,0xFB,0xFD,0x52
};
-uint16 to_uni_latin7_general_cs[] = {
+static const uint16 to_uni_latin7_general_cs[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -3245,7 +3245,7 @@ uint16 to_uni_latin7_general_cs[] = {
#endif
#ifdef HAVE_CHARSET_macce
-uchar ctype_macce_bin[] = {
+static const uchar ctype_macce_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -3265,7 +3265,7 @@ uchar ctype_macce_bin[] = {
0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x01,0x01,0x02,0x01,0x00
};
-uchar to_lower_macce_bin[] = {
+static const uchar to_lower_macce_bin[] = {
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,
@@ -3284,7 +3284,7 @@ uchar to_lower_macce_bin[] = {
0xF0,0xF3,0x9C,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFA,0xFD,0xB8,0xFD,0xAE,0xFF
};
-uchar to_upper_macce_bin[] = {
+static const uchar to_upper_macce_bin[] = {
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,
@@ -3303,7 +3303,7 @@ uchar to_upper_macce_bin[] = {
0xED,0xF1,0xF2,0xF1,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xB5,0xFB,0xFC,0xFB,0xFE,0xFF
};
-uint16 to_uni_macce_bin[] = {
+static const uint16 to_uni_macce_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -3341,7 +3341,7 @@ uint16 to_uni_macce_bin[] = {
#endif
#ifdef HAVE_CHARSET_cp1250
-uchar ctype_cp1250_croatian_ci[] = {
+static const uchar ctype_cp1250_croatian_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -3361,7 +3361,7 @@ uchar ctype_cp1250_croatian_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_cp1250_croatian_ci[] = {
+static const uchar to_lower_cp1250_croatian_ci[] = {
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,
@@ -3380,7 +3380,7 @@ uchar to_lower_cp1250_croatian_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1250_croatian_ci[] = {
+static const uchar to_upper_cp1250_croatian_ci[] = {
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,
@@ -3399,7 +3399,7 @@ uchar to_upper_cp1250_croatian_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_cp1250_croatian_ci[] = {
+static const uchar sort_order_cp1250_croatian_ci[] = {
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,
@@ -3418,7 +3418,7 @@ uchar sort_order_cp1250_croatian_ci[] =
0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xC9,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF
};
-uint16 to_uni_cp1250_croatian_ci[] = {
+static const uint16 to_uni_cp1250_croatian_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -3456,7 +3456,7 @@ uint16 to_uni_cp1250_croatian_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin1
-uchar ctype_latin1_general_ci[] = {
+static const uchar ctype_latin1_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -3476,7 +3476,7 @@ uchar ctype_latin1_general_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_latin1_general_ci[] = {
+static const uchar to_lower_latin1_general_ci[] = {
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,
@@ -3495,7 +3495,7 @@ uchar to_lower_latin1_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin1_general_ci[] = {
+static const uchar to_upper_latin1_general_ci[] = {
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,
@@ -3514,7 +3514,7 @@ uchar to_upper_latin1_general_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin1_general_ci[] = {
+static const uchar sort_order_latin1_general_ci[] = {
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,
@@ -3533,7 +3533,7 @@ uchar sort_order_latin1_general_ci[] = {
0x59,0x7F,0x83,0x85,0x87,0x89,0x8B,0xBE,0x8D,0x9C,0x9E,0xA0,0xA2,0xAC,0xB1,0xAE
};
-uint16 to_uni_latin1_general_ci[] = {
+static const uint16 to_uni_latin1_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -3571,7 +3571,7 @@ uint16 to_uni_latin1_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin1
-uchar ctype_latin1_general_cs[] = {
+static const uchar ctype_latin1_general_cs[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -3591,7 +3591,7 @@ uchar ctype_latin1_general_cs[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_latin1_general_cs[] = {
+static const uchar to_lower_latin1_general_cs[] = {
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,
@@ -3610,7 +3610,7 @@ uchar to_lower_latin1_general_cs[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin1_general_cs[] = {
+static const uchar to_upper_latin1_general_cs[] = {
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,
@@ -3629,7 +3629,7 @@ uchar to_upper_latin1_general_cs[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin1_general_cs[] = {
+static const uchar sort_order_latin1_general_cs[] = {
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,
@@ -3648,7 +3648,7 @@ uchar sort_order_latin1_general_cs[] = {
0x5A,0x80,0x84,0x86,0x88,0x8A,0x8C,0xBE,0x8E,0x9D,0x9F,0xA1,0xA3,0xAD,0xB2,0xAE
};
-uint16 to_uni_latin1_general_cs[] = {
+static const uint16 to_uni_latin1_general_cs[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -3686,7 +3686,7 @@ uint16 to_uni_latin1_general_cs[] = {
#endif
#ifdef HAVE_CHARSET_cp1251
-uchar ctype_cp1251_bin[] = {
+static const uchar ctype_cp1251_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -3706,7 +3706,7 @@ uchar ctype_cp1251_bin[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_cp1251_bin[] = {
+static const uchar to_lower_cp1251_bin[] = {
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,
@@ -3725,7 +3725,7 @@ uchar to_lower_cp1251_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1251_bin[] = {
+static const uchar to_upper_cp1251_bin[] = {
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,
@@ -3744,7 +3744,7 @@ uchar to_upper_cp1251_bin[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
};
-uint16 to_uni_cp1251_bin[] = {
+static const uint16 to_uni_cp1251_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -3782,7 +3782,7 @@ uint16 to_uni_cp1251_bin[] = {
#endif
#ifdef HAVE_CHARSET_cp1251
-uchar ctype_cp1251_general_ci[] = {
+static const uchar ctype_cp1251_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -3802,7 +3802,7 @@ uchar ctype_cp1251_general_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_cp1251_general_ci[] = {
+static const uchar to_lower_cp1251_general_ci[] = {
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,
@@ -3821,7 +3821,7 @@ uchar to_lower_cp1251_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1251_general_ci[] = {
+static const uchar to_upper_cp1251_general_ci[] = {
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,
@@ -3840,7 +3840,7 @@ uchar to_upper_cp1251_general_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
};
-uchar sort_order_cp1251_general_ci[] = {
+static const uchar sort_order_cp1251_general_ci[] = {
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,
@@ -3859,7 +3859,7 @@ uchar sort_order_cp1251_general_ci[] = {
0xAD,0xAF,0xB1,0xB5,0xB9,0xBB,0xBD,0xBF,0xC3,0xC5,0xC7,0xC9,0xCB,0xCD,0xCF,0xD1
};
-uint16 to_uni_cp1251_general_ci[] = {
+static const uint16 to_uni_cp1251_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -3897,7 +3897,7 @@ uint16 to_uni_cp1251_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1251
-uchar ctype_cp1251_general_cs[] = {
+static const uchar ctype_cp1251_general_cs[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -3917,7 +3917,7 @@ uchar ctype_cp1251_general_cs[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_cp1251_general_cs[] = {
+static const uchar to_lower_cp1251_general_cs[] = {
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,
@@ -3936,7 +3936,7 @@ uchar to_lower_cp1251_general_cs[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1251_general_cs[] = {
+static const uchar to_upper_cp1251_general_cs[] = {
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,
@@ -3955,7 +3955,7 @@ uchar to_upper_cp1251_general_cs[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
};
-uchar sort_order_cp1251_general_cs[] = {
+static const uchar sort_order_cp1251_general_cs[] = {
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,
@@ -3974,7 +3974,7 @@ uchar sort_order_cp1251_general_cs[] = {
0xAE,0xB0,0xB2,0xB6,0xBA,0xBC,0xBE,0xC0,0xC4,0xC6,0xC8,0xCA,0xCC,0xCE,0xD0,0xD2
};
-uint16 to_uni_cp1251_general_cs[] = {
+static const uint16 to_uni_cp1251_general_cs[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4012,7 +4012,7 @@ uint16 to_uni_cp1251_general_cs[] = {
#endif
#ifdef HAVE_CHARSET_macroman
-uchar ctype_macroman_bin[] = {
+static const uchar ctype_macroman_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4032,7 +4032,7 @@ uchar ctype_macroman_bin[] = {
0x00,0x01,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-uchar to_lower_macroman_bin[] = {
+static const uchar to_lower_macroman_bin[] = {
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,
@@ -4051,7 +4051,7 @@ uchar to_lower_macroman_bin[] = {
0xF0,0x98,0x9C,0x9E,0x9D,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_macroman_bin[] = {
+static const uchar to_upper_macroman_bin[] = {
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,
@@ -4070,7 +4070,7 @@ uchar to_upper_macroman_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_macroman_bin[] = {
+static const uint16 to_uni_macroman_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4108,7 +4108,7 @@ uint16 to_uni_macroman_bin[] = {
#endif
#ifdef HAVE_CHARSET_cp1256
-uchar ctype_cp1256_general_ci[] = {
+static const uchar ctype_cp1256_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4128,7 +4128,7 @@ uchar ctype_cp1256_general_ci[] = {
0x03,0x03,0x03,0x03,0x02,0x03,0x03,0x00,0x03,0x02,0x03,0x02,0x02,0x00,0x00,0x00
};
-uchar to_lower_cp1256_general_ci[] = {
+static const uchar to_lower_cp1256_general_ci[] = {
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,
@@ -4147,7 +4147,7 @@ uchar to_lower_cp1256_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1256_general_ci[] = {
+static const uchar to_upper_cp1256_general_ci[] = {
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,
@@ -4166,7 +4166,7 @@ uchar to_upper_cp1256_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_cp1256_general_ci[] = {
+static const uchar sort_order_cp1256_general_ci[] = {
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,
@@ -4185,7 +4185,7 @@ uchar sort_order_cp1256_general_ci[] = {
0xAE,0xAF,0xB0,0xB1,0x69,0xB2,0xB3,0xFC,0xB4,0x78,0xB5,0x79,0x7A,0xFD,0xFE,0xFF
};
-uint16 to_uni_cp1256_general_ci[] = {
+static const uint16 to_uni_cp1256_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4223,7 +4223,7 @@ uint16 to_uni_cp1256_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1257
-uchar ctype_cp1257_bin[] = {
+static const uchar ctype_cp1257_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4243,7 +4243,7 @@ uchar ctype_cp1257_bin[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00
};
-uchar to_lower_cp1257_bin[] = {
+static const uchar to_lower_cp1257_bin[] = {
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,
@@ -4262,7 +4262,7 @@ uchar to_lower_cp1257_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1257_bin[] = {
+static const uchar to_upper_cp1257_bin[] = {
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,
@@ -4281,7 +4281,7 @@ uchar to_upper_cp1257_bin[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uint16 to_uni_cp1257_bin[] = {
+static const uint16 to_uni_cp1257_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4319,7 +4319,7 @@ uint16 to_uni_cp1257_bin[] = {
#endif
#ifdef HAVE_CHARSET_cp1257
-uchar ctype_cp1257_general_ci[] = {
+static const uchar ctype_cp1257_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4339,7 +4339,7 @@ uchar ctype_cp1257_general_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00
};
-uchar to_lower_cp1257_general_ci[] = {
+static const uchar to_lower_cp1257_general_ci[] = {
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,
@@ -4358,7 +4358,7 @@ uchar to_lower_cp1257_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1257_general_ci[] = {
+static const uchar to_upper_cp1257_general_ci[] = {
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,
@@ -4377,7 +4377,7 @@ uchar to_upper_cp1257_general_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_cp1257_general_ci[] = {
+static const uchar sort_order_cp1257_general_ci[] = {
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,
@@ -4396,7 +4396,7 @@ uchar sort_order_cp1257_general_ci[] = {
0x97,0x7D,0x7D,0x83,0x83,0x83,0x83,0xC3,0xA0,0x75,0x97,0xA0,0xA0,0xB0,0xB0,0xFF
};
-uint16 to_uni_cp1257_general_ci[] = {
+static const uint16 to_uni_cp1257_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4434,7 +4434,7 @@ uint16 to_uni_cp1257_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_armscii8
-uchar ctype_armscii8_bin[] = {
+static const uchar ctype_armscii8_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4454,7 +4454,7 @@ uchar ctype_armscii8_bin[] = {
0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x10,0x10
};
-uchar to_lower_armscii8_bin[] = {
+static const uchar to_lower_armscii8_bin[] = {
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,
@@ -4473,7 +4473,7 @@ uchar to_lower_armscii8_bin[] = {
0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFB,0xFB,0xFD,0xFD,0xFE,0xFF
};
-uchar to_upper_armscii8_bin[] = {
+static const uchar to_upper_armscii8_bin[] = {
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,
@@ -4492,7 +4492,7 @@ uchar to_upper_armscii8_bin[] = {
0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFE,0xFF
};
-uint16 to_uni_armscii8_bin[] = {
+static const uint16 to_uni_armscii8_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4530,7 +4530,7 @@ uint16 to_uni_armscii8_bin[] = {
#endif
#ifdef HAVE_CHARSET_ascii
-uchar ctype_ascii_bin[] = {
+static const uchar ctype_ascii_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4550,7 +4550,7 @@ uchar ctype_ascii_bin[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-uchar to_lower_ascii_bin[] = {
+static const uchar to_lower_ascii_bin[] = {
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,
@@ -4569,7 +4569,7 @@ uchar to_lower_ascii_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_ascii_bin[] = {
+static const uchar to_upper_ascii_bin[] = {
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,
@@ -4588,7 +4588,7 @@ uchar to_upper_ascii_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_ascii_bin[] = {
+static const uint16 to_uni_ascii_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4626,7 +4626,7 @@ uint16 to_uni_ascii_bin[] = {
#endif
#ifdef HAVE_CHARSET_cp1250
-uchar ctype_cp1250_bin[] = {
+static const uchar ctype_cp1250_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4646,7 +4646,7 @@ uchar ctype_cp1250_bin[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_cp1250_bin[] = {
+static const uchar to_lower_cp1250_bin[] = {
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,
@@ -4665,7 +4665,7 @@ uchar to_lower_cp1250_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1250_bin[] = {
+static const uchar to_upper_cp1250_bin[] = {
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,
@@ -4684,7 +4684,7 @@ uchar to_upper_cp1250_bin[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uint16 to_uni_cp1250_bin[] = {
+static const uint16 to_uni_cp1250_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4722,7 +4722,7 @@ uint16 to_uni_cp1250_bin[] = {
#endif
#ifdef HAVE_CHARSET_cp1256
-uchar ctype_cp1256_bin[] = {
+static const uchar ctype_cp1256_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4742,7 +4742,7 @@ uchar ctype_cp1256_bin[] = {
0x03,0x03,0x03,0x03,0x02,0x03,0x03,0x00,0x03,0x02,0x03,0x02,0x02,0x00,0x00,0x00
};
-uchar to_lower_cp1256_bin[] = {
+static const uchar to_lower_cp1256_bin[] = {
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,
@@ -4761,7 +4761,7 @@ uchar to_lower_cp1256_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1256_bin[] = {
+static const uchar to_upper_cp1256_bin[] = {
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,
@@ -4780,7 +4780,7 @@ uchar to_upper_cp1256_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_cp1256_bin[] = {
+static const uint16 to_uni_cp1256_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4818,7 +4818,7 @@ uint16 to_uni_cp1256_bin[] = {
#endif
#ifdef HAVE_CHARSET_cp866
-uchar ctype_cp866_bin[] = {
+static const uchar ctype_cp866_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4838,7 +4838,7 @@ uchar ctype_cp866_bin[] = {
0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48
};
-uchar to_lower_cp866_bin[] = {
+static const uchar to_lower_cp866_bin[] = {
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,
@@ -4857,7 +4857,7 @@ uchar to_lower_cp866_bin[] = {
0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp866_bin[] = {
+static const uchar to_upper_cp866_bin[] = {
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,
@@ -4876,7 +4876,7 @@ uchar to_upper_cp866_bin[] = {
0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_cp866_bin[] = {
+static const uint16 to_uni_cp866_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -4914,7 +4914,7 @@ uint16 to_uni_cp866_bin[] = {
#endif
#ifdef HAVE_CHARSET_dec8
-uchar ctype_dec8_bin[] = {
+static const uchar ctype_dec8_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -4934,7 +4934,7 @@ uchar ctype_dec8_bin[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_dec8_bin[] = {
+static const uchar to_lower_dec8_bin[] = {
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,
@@ -4953,7 +4953,7 @@ uchar to_lower_dec8_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_dec8_bin[] = {
+static const uchar to_upper_dec8_bin[] = {
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,
@@ -4972,7 +4972,7 @@ uchar to_upper_dec8_bin[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uint16 to_uni_dec8_bin[] = {
+static const uint16 to_uni_dec8_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5010,7 +5010,7 @@ uint16 to_uni_dec8_bin[] = {
#endif
#ifdef HAVE_CHARSET_greek
-uchar ctype_greek_bin[] = {
+static const uchar ctype_greek_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5030,7 +5030,7 @@ uchar ctype_greek_bin[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00
};
-uchar to_lower_greek_bin[] = {
+static const uchar to_lower_greek_bin[] = {
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,
@@ -5049,7 +5049,7 @@ uchar to_lower_greek_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_greek_bin[] = {
+static const uchar to_upper_greek_bin[] = {
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,
@@ -5068,7 +5068,7 @@ uchar to_upper_greek_bin[] = {
0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xCF,0xD5,0xD9,0xFF
};
-uint16 to_uni_greek_bin[] = {
+static const uint16 to_uni_greek_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5106,7 +5106,7 @@ uint16 to_uni_greek_bin[] = {
#endif
#ifdef HAVE_CHARSET_hebrew
-uchar ctype_hebrew_bin[] = {
+static const uchar ctype_hebrew_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5126,7 +5126,7 @@ uchar ctype_hebrew_bin[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00
};
-uchar to_lower_hebrew_bin[] = {
+static const uchar to_lower_hebrew_bin[] = {
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,
@@ -5145,7 +5145,7 @@ uchar to_lower_hebrew_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_hebrew_bin[] = {
+static const uchar to_upper_hebrew_bin[] = {
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,
@@ -5164,7 +5164,7 @@ uchar to_upper_hebrew_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_hebrew_bin[] = {
+static const uint16 to_uni_hebrew_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5202,7 +5202,7 @@ uint16 to_uni_hebrew_bin[] = {
#endif
#ifdef HAVE_CHARSET_hp8
-uchar ctype_hp8_bin[] = {
+static const uchar ctype_hp8_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5222,7 +5222,7 @@ uchar ctype_hp8_bin[] = {
0x10,0x10,0x20,0x20,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20
};
-uchar to_lower_hp8_bin[] = {
+static const uchar to_lower_hp8_bin[] = {
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,
@@ -5241,7 +5241,7 @@ uchar to_lower_hp8_bin[] = {
0xF1,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_hp8_bin[] = {
+static const uchar to_upper_hp8_bin[] = {
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,
@@ -5260,7 +5260,7 @@ uchar to_upper_hp8_bin[] = {
0xF0,0xF0,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_hp8_bin[] = {
+static const uint16 to_uni_hp8_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5298,7 +5298,7 @@ uint16 to_uni_hp8_bin[] = {
#endif
#ifdef HAVE_CHARSET_keybcs2
-uchar ctype_keybcs2_bin[] = {
+static const uchar ctype_keybcs2_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5318,7 +5318,7 @@ uchar ctype_keybcs2_bin[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48
};
-uchar to_lower_keybcs2_bin[] = {
+static const uchar to_lower_keybcs2_bin[] = {
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,
@@ -5337,7 +5337,7 @@ uchar to_lower_keybcs2_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_keybcs2_bin[] = {
+static const uchar to_upper_keybcs2_bin[] = {
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,
@@ -5356,7 +5356,7 @@ uchar to_upper_keybcs2_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_keybcs2_bin[] = {
+static const uint16 to_uni_keybcs2_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5394,7 +5394,7 @@ uint16 to_uni_keybcs2_bin[] = {
#endif
#ifdef HAVE_CHARSET_koi8r
-uchar ctype_koi8r_bin[] = {
+static const uchar ctype_koi8r_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5414,7 +5414,7 @@ uchar ctype_koi8r_bin[] = {
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01
};
-uchar to_lower_koi8r_bin[] = {
+static const uchar to_lower_koi8r_bin[] = {
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,
@@ -5433,7 +5433,7 @@ uchar to_lower_koi8r_bin[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
};
-uchar to_upper_koi8r_bin[] = {
+static const uchar to_upper_koi8r_bin[] = {
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,
@@ -5452,7 +5452,7 @@ uchar to_upper_koi8r_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_koi8r_bin[] = {
+static const uint16 to_uni_koi8r_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5490,7 +5490,7 @@ uint16 to_uni_koi8r_bin[] = {
#endif
#ifdef HAVE_CHARSET_koi8u
-uchar ctype_koi8u_bin[] = {
+static const uchar ctype_koi8u_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5510,7 +5510,7 @@ uchar ctype_koi8u_bin[] = {
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01
};
-uchar to_lower_koi8u_bin[] = {
+static const uchar to_lower_koi8u_bin[] = {
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,
@@ -5529,7 +5529,7 @@ uchar to_lower_koi8u_bin[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
};
-uchar to_upper_koi8u_bin[] = {
+static const uchar to_upper_koi8u_bin[] = {
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,
@@ -5548,7 +5548,7 @@ uchar to_upper_koi8u_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_koi8u_bin[] = {
+static const uint16 to_uni_koi8u_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5586,7 +5586,7 @@ uint16 to_uni_koi8u_bin[] = {
#endif
#ifdef HAVE_CHARSET_latin2
-uchar ctype_latin2_bin[] = {
+static const uchar ctype_latin2_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5606,7 +5606,7 @@ uchar ctype_latin2_bin[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_latin2_bin[] = {
+static const uchar to_lower_latin2_bin[] = {
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,
@@ -5625,7 +5625,7 @@ uchar to_lower_latin2_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin2_bin[] = {
+static const uchar to_upper_latin2_bin[] = {
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,
@@ -5644,7 +5644,7 @@ uchar to_upper_latin2_bin[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uint16 to_uni_latin2_bin[] = {
+static const uint16 to_uni_latin2_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5682,7 +5682,7 @@ uint16 to_uni_latin2_bin[] = {
#endif
#ifdef HAVE_CHARSET_latin5
-uchar ctype_latin5_bin[] = {
+static const uchar ctype_latin5_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5702,7 +5702,7 @@ uchar ctype_latin5_bin[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_latin5_bin[] = {
+static const uchar to_lower_latin5_bin[] = {
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,
@@ -5721,7 +5721,7 @@ uchar to_lower_latin5_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin5_bin[] = {
+static const uchar to_upper_latin5_bin[] = {
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,
@@ -5740,7 +5740,7 @@ uchar to_upper_latin5_bin[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0x49,0xDE,0xFF
};
-uint16 to_uni_latin5_bin[] = {
+static const uint16 to_uni_latin5_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5778,7 +5778,7 @@ uint16 to_uni_latin5_bin[] = {
#endif
#ifdef HAVE_CHARSET_latin7
-uchar ctype_latin7_bin[] = {
+static const uchar ctype_latin7_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5798,7 +5798,7 @@ uchar ctype_latin7_bin[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_latin7_bin[] = {
+static const uchar to_lower_latin7_bin[] = {
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,
@@ -5817,7 +5817,7 @@ uchar to_lower_latin7_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin7_bin[] = {
+static const uchar to_upper_latin7_bin[] = {
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,
@@ -5836,7 +5836,7 @@ uchar to_upper_latin7_bin[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uint16 to_uni_latin7_bin[] = {
+static const uint16 to_uni_latin7_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5874,7 +5874,7 @@ uint16 to_uni_latin7_bin[] = {
#endif
#ifdef HAVE_CHARSET_cp850
-uchar ctype_cp850_bin[] = {
+static const uchar ctype_cp850_bin[] = {
0x00,
0x20,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x30,0x30,
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x30,0x30,0x30,0x30,0x30,
@@ -5894,7 +5894,7 @@ uchar ctype_cp850_bin[] = {
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20
};
-uchar to_lower_cp850_bin[] = {
+static const uchar to_lower_cp850_bin[] = {
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,
@@ -5913,7 +5913,7 @@ uchar to_lower_cp850_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp850_bin[] = {
+static const uchar to_upper_cp850_bin[] = {
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,
@@ -5932,7 +5932,7 @@ uchar to_upper_cp850_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_cp850_bin[] = {
+static const uint16 to_uni_cp850_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -5970,7 +5970,7 @@ uint16 to_uni_cp850_bin[] = {
#endif
#ifdef HAVE_CHARSET_cp852
-uchar ctype_cp852_bin[] = {
+static const uchar ctype_cp852_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -5990,7 +5990,7 @@ uchar ctype_cp852_bin[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x00,0x48
};
-uchar to_lower_cp852_bin[] = {
+static const uchar to_lower_cp852_bin[] = {
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,
@@ -6009,7 +6009,7 @@ uchar to_lower_cp852_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp852_bin[] = {
+static const uchar to_upper_cp852_bin[] = {
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,
@@ -6028,7 +6028,7 @@ uchar to_upper_cp852_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF
};
-uint16 to_uni_cp852_bin[] = {
+static const uint16 to_uni_cp852_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -6066,7 +6066,7 @@ uint16 to_uni_cp852_bin[] = {
#endif
#ifdef HAVE_CHARSET_swe7
-uchar ctype_swe7_bin[] = {
+static const uchar ctype_swe7_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -6086,7 +6086,7 @@ uchar ctype_swe7_bin[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-uchar to_lower_swe7_bin[] = {
+static const uchar to_lower_swe7_bin[] = {
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,
@@ -6105,7 +6105,7 @@ uchar to_lower_swe7_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_swe7_bin[] = {
+static const uchar to_upper_swe7_bin[] = {
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,
@@ -6124,7 +6124,7 @@ uchar to_upper_swe7_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_swe7_bin[] = {
+static const uint16 to_uni_swe7_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -6162,7 +6162,7 @@ uint16 to_uni_swe7_bin[] = {
#endif
#ifdef HAVE_CHARSET_geostd8
-uchar ctype_geostd8_general_ci[] = {
+static const uchar ctype_geostd8_general_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -6182,7 +6182,7 @@ uchar ctype_geostd8_general_ci[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-uchar to_lower_geostd8_general_ci[] = {
+static const uchar to_lower_geostd8_general_ci[] = {
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,
@@ -6201,7 +6201,7 @@ uchar to_lower_geostd8_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_geostd8_general_ci[] = {
+static const uchar to_upper_geostd8_general_ci[] = {
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,
@@ -6220,7 +6220,7 @@ uchar to_upper_geostd8_general_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar sort_order_geostd8_general_ci[] = {
+static const uchar sort_order_geostd8_general_ci[] = {
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,
@@ -6239,7 +6239,7 @@ uchar sort_order_geostd8_general_ci[] =
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_geostd8_general_ci[] = {
+static const uint16 to_uni_geostd8_general_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -6277,7 +6277,7 @@ uint16 to_uni_geostd8_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_geostd8
-uchar ctype_geostd8_bin[] = {
+static const uchar ctype_geostd8_bin[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -6297,7 +6297,7 @@ uchar ctype_geostd8_bin[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-uchar to_lower_geostd8_bin[] = {
+static const uchar to_lower_geostd8_bin[] = {
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,
@@ -6316,7 +6316,7 @@ uchar to_lower_geostd8_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_geostd8_bin[] = {
+static const uchar to_upper_geostd8_bin[] = {
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,
@@ -6335,7 +6335,7 @@ uchar to_upper_geostd8_bin[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uint16 to_uni_geostd8_bin[] = {
+static const uint16 to_uni_geostd8_bin[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -6373,7 +6373,7 @@ uint16 to_uni_geostd8_bin[] = {
#endif
#ifdef HAVE_CHARSET_latin1
-uchar ctype_latin1_spanish_ci[] = {
+static const uchar ctype_latin1_spanish_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -6393,7 +6393,7 @@ uchar ctype_latin1_spanish_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
};
-uchar to_lower_latin1_spanish_ci[] = {
+static const uchar to_lower_latin1_spanish_ci[] = {
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,
@@ -6412,7 +6412,7 @@ uchar to_lower_latin1_spanish_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_latin1_spanish_ci[] = {
+static const uchar to_upper_latin1_spanish_ci[] = {
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,
@@ -6431,7 +6431,7 @@ uchar to_upper_latin1_spanish_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_latin1_spanish_ci[] = {
+static const uchar sort_order_latin1_spanish_ci[] = {
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,
@@ -6450,7 +6450,7 @@ uchar sort_order_latin1_spanish_ci[] = {
0x57,0x7F,0x81,0x81,0x81,0x81,0x81,0xBE,0x81,0x9A,0x9A,0x9A,0x9A,0xAA,0xB1,0xAA
};
-uint16 to_uni_latin1_spanish_ci[] = {
+static const uint16 to_uni_latin1_spanish_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -6488,7 +6488,7 @@ uint16 to_uni_latin1_spanish_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1250
-uchar ctype_cp1250_polish_ci[] = {
+static const uchar ctype_cp1250_polish_ci[] = {
0x00,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
@@ -6508,7 +6508,7 @@ uchar ctype_cp1250_polish_ci[] = {
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
};
-uchar to_lower_cp1250_polish_ci[] = {
+static const uchar to_lower_cp1250_polish_ci[] = {
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,
@@ -6527,7 +6527,7 @@ uchar to_lower_cp1250_polish_ci[] = {
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
};
-uchar to_upper_cp1250_polish_ci[] = {
+static const uchar to_upper_cp1250_polish_ci[] = {
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,
@@ -6546,7 +6546,7 @@ uchar to_upper_cp1250_polish_ci[] = {
0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
};
-uchar sort_order_cp1250_polish_ci[] = {
+static const uchar sort_order_cp1250_polish_ci[] = {
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,
@@ -6565,7 +6565,7 @@ uchar sort_order_cp1250_polish_ci[] = {
0x48,0x58,0x57,0x5A,0x59,0x59,0x59,0xC9,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF
};
-uint16 to_uni_cp1250_polish_ci[] = {
+static const uint16 to_uni_cp1250_polish_ci[] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
@@ -6602,7 +6602,7 @@ uint16 to_uni_cp1250_polish_ci[] = {
#endif
-CHARSET_INFO compiled_charsets[] = {
+struct charset_info_st compiled_charsets[] = {
#ifdef HAVE_CHARSET_dec8
{
3,0,0,
=== modified file 'strings/ctype-gb2312.c'
--- a/strings/ctype-gb2312.c 2008-02-20 18:49:26 +0000
+++ b/strings/ctype-gb2312.c 2010-01-06 19:20:16 +0000
@@ -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_INF
/* 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 c
/* 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_han
};
-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_c
&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 */
=== modified file 'strings/ctype-gbk.c'
--- a/strings/ctype-gbk.c 2008-04-23 06:06:26 +0000
+++ b/strings/ctype-gbk.c 2010-01-06 19:20:16 +0000
@@ -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 *
}
/* 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_han
};
-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 */
=== modified file 'strings/ctype-latin1.c'
--- a/strings/ctype-latin1.c 2007-05-10 09:59:39 +0000
+++ b/strings/ctype-latin1.c 2010-01-06 19:20:16 +0000
@@ -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 __
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_han
};
-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
};
-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_c
};
-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 */
=== modified file 'strings/ctype-mb.c'
--- a/strings/ctype-mb.c 2009-11-30 12:42:24 +0000
+++ b/strings/ctype-mb.c 2010-01-06 19:20:16 +0000
@@ -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 * c
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, c
{
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, c
{
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, c
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_INF
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},
=== modified file 'strings/ctype-simple.c'
--- a/strings/ctype-simple.c 2009-10-12 07:43:15 +0000
+++ b/strings/ctype-simple.c 2010-01-06 19:20:16 +0000
@@ -75,7 +75,7 @@ size_t my_strnxfrm_simple(CHARSET_INFO *
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 * c
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 *
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 *
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,
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,
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,
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 *c
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 vo
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_IN
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_IN
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
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_IN
}
}
-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);
=== modified file 'strings/ctype-sjis.c'
--- a/strings/ctype-sjis.c 2009-09-07 20:50:10 +0000
+++ b/strings/ctype-sjis.c 2010-01-06 19:20:16 +0000
@@ -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(CHARSE
}
/* 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 cod
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_han
};
-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 */
=== modified file 'strings/ctype-tis620.c'
--- a/strings/ctype-tis620.c 2007-05-10 09:59:39 +0000
+++ b/strings/ctype-tis620.c 2010-01-06 19:20:16 +0000
@@ -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,
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 *
}
-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 __
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_han
-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 */
=== modified file 'strings/ctype-uca.c'
--- a/strings/ctype-uca.c 2009-12-03 11:34:11 +0000
+++ b/strings/ctype-uca.c 2010-01-06 19:20:16 +0000
@@ -31,7 +31,6 @@
- No combining marks processing is done
*/
-
#include <my_global.h>
#include "m_string.h"
#include "m_ctype.h"
@@ -49,7 +48,7 @@
#define MY_UCA_CMASK 255
#define MY_UCA_PSHIFT 8
-uint16 page000data[]= { /* 0000 (4 weights per char) */
+static const uint16 page000data[]= { /* 0000 (4 weights per char) */
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
@@ -180,7 +179,7 @@ uint16 page000data[]= { /* 0000 (4 weigh
0x1094,0x0000,0x0000,0x0000, 0x105E,0x0000,0x0000,0x0000
};
-uint16 page001data[]= { /* 0100 (3 weights per char) */
+static const uint16 page001data[]= { /* 0100 (3 weights per char) */
0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000,
0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000,
0x0E60,0x0000,0x0000, 0x0E60,0x0000,0x0000, 0x0E60,0x0000,0x0000,
@@ -268,7 +267,7 @@ uint16 page001data[]= { /* 0100 (3 weigh
0x0E38,0x0000,0x0000, 0x0E38,0x0000,0x0000, 0x0F8D,0x0000,0x0000,
0x0F8D,0x0000,0x0000 };
-uint16 page002data[]= { /* 0200 (3 weights per char) */
+static const uint16 page002data[]= { /* 0200 (3 weights per char) */
0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000,
0x0E33,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000,
0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0EFB,0x0000,0x0000,
@@ -356,7 +355,7 @@ uint16 page002data[]= { /* 0200 (3 weigh
0x0346,0x0000,0x0000, 0x0347,0x0000,0x0000, 0x0348,0x0000,0x0000,
0x0349,0x0000,0x0000 };
-uint16 page003data[]= { /* 0300 (4 weights per char) */
+static const uint16 page003data[]= { /* 0300 (4 weights per char) */
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
@@ -487,7 +486,7 @@ uint16 page003data[]= { /* 0300 (4 weigh
0xFBC0,0x83FE,0x0000,0x0000, 0xFBC0,0x83FF,0x0000,0x0000
};
-uint16 page004data[]= { /* 0400 (3 weights per char) */
+static const uint16 page004data[]= { /* 0400 (3 weights per char) */
0x1152,0x0000,0x0000, 0x1152,0x0000,0x0000, 0x1145,0x0000,0x0000,
0x114A,0x0000,0x0000, 0x115A,0x0000,0x0000, 0x1173,0x0000,0x0000,
0x1188,0x0000,0x0000, 0x118C,0x0000,0x0000, 0x1194,0x0000,0x0000,
@@ -575,7 +574,7 @@ uint16 page004data[]= { /* 0400 (3 weigh
0xFBC0,0x84FC,0x0000, 0xFBC0,0x84FD,0x0000, 0xFBC0,0x84FE,0x0000,
0xFBC0,0x84FF,0x0000 };
-uint16 page005data[]= { /* 0500 (3 weights per char) */
+static const uint16 page005data[]= { /* 0500 (3 weights per char) */
0x1144,0x0000,0x0000, 0x1144,0x0000,0x0000, 0x1149,0x0000,0x0000,
0x1149,0x0000,0x0000, 0x116E,0x0000,0x0000, 0x116E,0x0000,0x0000,
0x117B,0x0000,0x0000, 0x117B,0x0000,0x0000, 0x11BD,0x0000,0x0000,
@@ -663,7 +662,7 @@ uint16 page005data[]= { /* 0500 (3 weigh
0xFBC0,0x85FC,0x0000, 0xFBC0,0x85FD,0x0000, 0xFBC0,0x85FE,0x0000,
0xFBC0,0x85FF,0x0000 };
-uint16 page006data[]= { /* 0600 (3 weights per char) */
+static const uint16 page006data[]= { /* 0600 (3 weights per char) */
0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000, 0xFBC0,0x8604,0x0000, 0xFBC0,0x8605,0x0000,
0xFBC0,0x8606,0x0000, 0xFBC0,0x8607,0x0000, 0xFBC0,0x8608,0x0000,
@@ -751,7 +750,7 @@ uint16 page006data[]= { /* 0600 (3 weigh
0x1392,0x0000,0x0000, 0x1347,0x0000,0x0000, 0x13B0,0x0000,0x0000,
0x13BB,0x0000,0x0000 };
-uint16 page007data[]= { /* 0700 (3 weights per char) */
+static const uint16 page007data[]= { /* 0700 (3 weights per char) */
0x0270,0x0000,0x0000, 0x0260,0x0000,0x0000, 0x0261,0x0000,0x0000,
0x023F,0x0000,0x0000, 0x0240,0x0000,0x0000, 0x0241,0x0000,0x0000,
0x0242,0x0000,0x0000, 0x0243,0x0000,0x0000, 0x0244,0x0000,0x0000,
@@ -839,7 +838,7 @@ uint16 page007data[]= { /* 0700 (3 weigh
0xFBC0,0x87FC,0x0000, 0xFBC0,0x87FD,0x0000, 0xFBC0,0x87FE,0x0000,
0xFBC0,0x87FF,0x0000 };
-uint16 page009data[]= { /* 0900 (3 weights per char) */
+static const uint16 page009data[]= { /* 0900 (3 weights per char) */
0xFBC0,0x8900,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000, 0x155A,0x0000,0x0000, 0x155B,0x0000,0x0000,
0x155C,0x0000,0x0000, 0x155D,0x0000,0x0000, 0x155E,0x0000,0x0000,
@@ -927,7 +926,7 @@ uint16 page009data[]= { /* 0900 (3 weigh
0xFBC0,0x89FC,0x0000, 0xFBC0,0x89FD,0x0000, 0xFBC0,0x89FE,0x0000,
0xFBC0,0x89FF,0x0000 };
-uint16 page00Adata[]= { /* 0A00 (3 weights per char) */
+static const uint16 page00Adata[]= { /* 0A00 (3 weights per char) */
0xFBC0,0x8A00,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000, 0xFBC0,0x8A04,0x0000, 0x15E7,0x0000,0x0000,
0x15E8,0x0000,0x0000, 0x15EC,0x0000,0x0000, 0x15ED,0x0000,0x0000,
@@ -1015,7 +1014,7 @@ uint16 page00Adata[]= { /* 0A00 (3 weigh
0xFBC0,0x8AFC,0x0000, 0xFBC0,0x8AFD,0x0000, 0xFBC0,0x8AFE,0x0000,
0xFBC0,0x8AFF,0x0000 };
-uint16 page00Bdata[]= { /* 0B00 (3 weights per char) */
+static const uint16 page00Bdata[]= { /* 0B00 (3 weights per char) */
0xFBC0,0x8B00,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000, 0xFBC0,0x8B04,0x0000, 0x165D,0x0000,0x0000,
0x165E,0x0000,0x0000, 0x165F,0x0000,0x0000, 0x1660,0x0000,0x0000,
@@ -1103,7 +1102,7 @@ uint16 page00Bdata[]= { /* 0B00 (3 weigh
0xFBC0,0x8BFC,0x0000, 0xFBC0,0x8BFD,0x0000, 0xFBC0,0x8BFE,0x0000,
0xFBC0,0x8BFF,0x0000 };
-uint16 page00Cdata[]= { /* 0C00 (3 weights per char) */
+static const uint16 page00Cdata[]= { /* 0C00 (3 weights per char) */
0xFBC0,0x8C00,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000, 0xFBC0,0x8C04,0x0000, 0x16CD,0x0000,0x0000,
0x16CE,0x0000,0x0000, 0x16CF,0x0000,0x0000, 0x16D0,0x0000,0x0000,
@@ -1191,7 +1190,7 @@ uint16 page00Cdata[]= { /* 0C00 (3 weigh
0xFBC0,0x8CFC,0x0000, 0xFBC0,0x8CFD,0x0000, 0xFBC0,0x8CFE,0x0000,
0xFBC0,0x8CFF,0x0000 };
-uint16 page00Ddata[]= { /* 0D00 (3 weights per char) */
+static const uint16 page00Ddata[]= { /* 0D00 (3 weights per char) */
0xFBC0,0x8D00,0x0000, 0xFBC0,0x8D01,0x0000, 0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000, 0xFBC0,0x8D04,0x0000, 0x1755,0x0000,0x0000,
0x1756,0x0000,0x0000, 0x1757,0x0000,0x0000, 0x1758,0x0000,0x0000,
@@ -1279,7 +1278,7 @@ uint16 page00Ddata[]= { /* 0D00 (3 weigh
0xFBC0,0x8DFC,0x0000, 0xFBC0,0x8DFD,0x0000, 0xFBC0,0x8DFE,0x0000,
0xFBC0,0x8DFF,0x0000 };
-uint16 page00Edata[]= { /* 0E00 (3 weights per char) */
+static const uint16 page00Edata[]= { /* 0E00 (3 weights per char) */
0xFBC0,0x8E00,0x0000, 0x17E4,0x0000,0x0000, 0x17E5,0x0000,0x0000,
0x17E6,0x0000,0x0000, 0x17E7,0x0000,0x0000, 0x17E8,0x0000,0x0000,
0x17E9,0x0000,0x0000, 0x17EA,0x0000,0x0000, 0x17EB,0x0000,0x0000,
@@ -1367,7 +1366,7 @@ uint16 page00Edata[]= { /* 0E00 (3 weigh
0xFBC0,0x8EFC,0x0000, 0xFBC0,0x8EFD,0x0000, 0xFBC0,0x8EFE,0x0000,
0xFBC0,0x8EFF,0x0000 };
-uint16 page00Fdata[]= { /* 0F00 (3 weights per char) */
+static const uint16 page00Fdata[]= { /* 0F00 (3 weights per char) */
0x189A,0x18AD,0x0000, 0x035A,0x0000,0x0000, 0x035B,0x0000,0x0000,
0x035C,0x0000,0x0000, 0x02FE,0x0000,0x0000, 0x02FF,0x0000,0x0000,
0x0300,0x0000,0x0000, 0x0301,0x0000,0x0000, 0x0302,0x0000,0x0000,
@@ -1455,7 +1454,7 @@ uint16 page00Fdata[]= { /* 0F00 (3 weigh
0xFBC0,0x8FFC,0x0000, 0xFBC0,0x8FFD,0x0000, 0xFBC0,0x8FFE,0x0000,
0xFBC0,0x8FFF,0x0000 };
-uint16 page010data[]= { /* 1000 (3 weights per char) */
+static const uint16 page010data[]= { /* 1000 (3 weights per char) */
0x1931,0x0000,0x0000, 0x1932,0x0000,0x0000, 0x1933,0x0000,0x0000,
0x1934,0x0000,0x0000, 0x1935,0x0000,0x0000, 0x1936,0x0000,0x0000,
0x1937,0x0000,0x0000, 0x1938,0x0000,0x0000, 0x1939,0x0000,0x0000,
@@ -1543,7 +1542,7 @@ uint16 page010data[]= { /* 1000 (3 weigh
0xFBC0,0x90FC,0x0000, 0xFBC0,0x90FD,0x0000, 0xFBC0,0x90FE,0x0000,
0xFBC0,0x90FF,0x0000 };
-uint16 page011data[]= { /* 1100 (3 weights per char) */
+static const uint16 page011data[]= { /* 1100 (3 weights per char) */
0x1D62,0x0000,0x0000, 0x1D63,0x0000,0x0000, 0x1D64,0x0000,0x0000,
0x1D65,0x0000,0x0000, 0x1D66,0x0000,0x0000, 0x1D67,0x0000,0x0000,
0x1D68,0x0000,0x0000, 0x1D69,0x0000,0x0000, 0x1D6A,0x0000,0x0000,
@@ -1631,7 +1630,7 @@ uint16 page011data[]= { /* 1100 (3 weigh
0xFBC0,0x91FC,0x0000, 0xFBC0,0x91FD,0x0000, 0xFBC0,0x91FE,0x0000,
0xFBC0,0x91FF,0x0000 };
-uint16 page012data[]= { /* 1200 (3 weights per char) */
+static const uint16 page012data[]= { /* 1200 (3 weights per char) */
0x141C,0x0000,0x0000, 0x141D,0x0000,0x0000, 0x141E,0x0000,0x0000,
0x141F,0x0000,0x0000, 0x1420,0x0000,0x0000, 0x1421,0x0000,0x0000,
0x1422,0x0000,0x0000, 0xFBC0,0x9207,0x0000, 0x1423,0x0000,0x0000,
@@ -1719,7 +1718,7 @@ uint16 page012data[]= { /* 1200 (3 weigh
0x1500,0x0000,0x0000, 0x1501,0x0000,0x0000, 0x1502,0x0000,0x0000,
0x1503,0x0000,0x0000 };
-uint16 page013data[]= { /* 1300 (3 weights per char) */
+static const uint16 page013data[]= { /* 1300 (3 weights per char) */
0x1504,0x0000,0x0000, 0x1505,0x0000,0x0000, 0x1506,0x0000,0x0000,
0x1507,0x0000,0x0000, 0x1508,0x0000,0x0000, 0x1509,0x0000,0x0000,
0x150A,0x0000,0x0000, 0x150B,0x0000,0x0000, 0x150C,0x0000,0x0000,
@@ -1807,7 +1806,7 @@ uint16 page013data[]= { /* 1300 (3 weigh
0xFBC0,0x93FC,0x0000, 0xFBC0,0x93FD,0x0000, 0xFBC0,0x93FE,0x0000,
0xFBC0,0x93FF,0x0000 };
-uint16 page014data[]= { /* 1400 (3 weights per char) */
+static const uint16 page014data[]= { /* 1400 (3 weights per char) */
0xFBC0,0x9400,0x0000, 0x1AAE,0x0000,0x0000, 0x1AAF,0x0000,0x0000,
0x1AB0,0x0000,0x0000, 0x1AB1,0x0000,0x0000, 0x1AB2,0x0000,0x0000,
0x1AB3,0x0000,0x0000, 0x1AB4,0x0000,0x0000, 0x1AB5,0x0000,0x0000,
@@ -1895,7 +1894,7 @@ uint16 page014data[]= { /* 1400 (3 weigh
0x1BA9,0x0000,0x0000, 0x1BAA,0x0000,0x0000, 0x1BAB,0x0000,0x0000,
0x1BAC,0x0000,0x0000 };
-uint16 page015data[]= { /* 1500 (2 weights per char) */
+static const uint16 page015data[]= { /* 1500 (2 weights per char) */
0x1BAD,0x0000, 0x1BAE,0x0000, 0x1BAF,0x0000, 0x1BB0,0x0000,
0x1BB1,0x0000, 0x1BB2,0x0000, 0x1BB3,0x0000, 0x1BB4,0x0000,
0x1BB5,0x0000, 0x1BB6,0x0000, 0x1BB7,0x0000, 0x1BB8,0x0000,
@@ -1962,7 +1961,7 @@ uint16 page015data[]= { /* 1500 (2 weigh
0x1CB1,0x0000, 0x1CB2,0x0000, 0x1CB3,0x0000, 0x1CB4,0x0000
};
-uint16 page016data[]= { /* 1600 (3 weights per char) */
+static const uint16 page016data[]= { /* 1600 (3 weights per char) */
0x1CB5,0x0000,0x0000, 0x1CB6,0x0000,0x0000, 0x1CB7,0x0000,0x0000,
0x1CB8,0x0000,0x0000, 0x1CB9,0x0000,0x0000, 0x1CBA,0x0000,0x0000,
0x1CBB,0x0000,0x0000, 0x1CBC,0x0000,0x0000, 0x1CBD,0x0000,0x0000,
@@ -2050,7 +2049,7 @@ uint16 page016data[]= { /* 1600 (3 weigh
0xFBC0,0x96FC,0x0000, 0xFBC0,0x96FD,0x0000, 0xFBC0,0x96FE,0x0000,
0xFBC0,0x96FF,0x0000 };
-uint16 page017data[]= { /* 1700 (3 weights per char) */
+static const uint16 page017data[]= { /* 1700 (3 weights per char) */
0x18E2,0x0000,0x0000, 0x18E3,0x0000,0x0000, 0x18E4,0x0000,0x0000,
0x18E5,0x0000,0x0000, 0x18E6,0x0000,0x0000, 0x18E7,0x0000,0x0000,
0x18E8,0x0000,0x0000, 0x18E9,0x0000,0x0000, 0x18EA,0x0000,0x0000,
@@ -2138,7 +2137,7 @@ uint16 page017data[]= { /* 1700 (3 weigh
0xFBC0,0x97FC,0x0000, 0xFBC0,0x97FD,0x0000, 0xFBC0,0x97FE,0x0000,
0xFBC0,0x97FF,0x0000 };
-uint16 page018data[]= { /* 1800 (3 weights per char) */
+static const uint16 page018data[]= { /* 1800 (3 weights per char) */
0x02F8,0x0000,0x0000, 0x025E,0x0000,0x0000, 0x0235,0x0000,0x0000,
0x0263,0x0000,0x0000, 0x024A,0x0000,0x0000, 0x024B,0x0000,0x0000,
0x0223,0x0000,0x0000, 0x0224,0x0000,0x0000, 0x0236,0x0000,0x0000,
@@ -2226,7 +2225,7 @@ uint16 page018data[]= { /* 1800 (3 weigh
0xFBC0,0x98FC,0x0000, 0xFBC0,0x98FD,0x0000, 0xFBC0,0x98FE,0x0000,
0xFBC0,0x98FF,0x0000 };
-uint16 page019data[]= { /* 1900 (3 weights per char) */
+static const uint16 page019data[]= { /* 1900 (3 weights per char) */
0x18B0,0x0000,0x0000, 0x18B1,0x0000,0x0000, 0x18B2,0x0000,0x0000,
0x18B3,0x0000,0x0000, 0x18B4,0x0000,0x0000, 0x18B5,0x0000,0x0000,
0x18B6,0x0000,0x0000, 0x18B7,0x0000,0x0000, 0x18B8,0x0000,0x0000,
@@ -2314,7 +2313,7 @@ uint16 page019data[]= { /* 1900 (3 weigh
0x0397,0x0000,0x0000, 0x0398,0x0000,0x0000, 0x0399,0x0000,0x0000,
0x039A,0x0000,0x0000 };
-uint16 page01Ddata[]= { /* 1D00 (3 weights per char) */
+static const uint16 page01Ddata[]= { /* 1D00 (3 weights per char) */
0x0E37,0x0000,0x0000, 0x0E3C,0x0000,0x0000, 0x0E3D,0x0000,0x0000,
0x0E57,0x0000,0x0000, 0x0E64,0x0000,0x0000, 0x0E71,0x0000,0x0000,
0x0E8A,0x0000,0x0000, 0x0E8F,0x0000,0x0000, 0x0EA8,0x0000,0x0000,
@@ -2402,7 +2401,7 @@ uint16 page01Ddata[]= { /* 1D00 (3 weigh
0xFBC0,0x9DFC,0x0000, 0xFBC0,0x9DFD,0x0000, 0xFBC0,0x9DFE,0x0000,
0xFBC0,0x9DFF,0x0000 };
-uint16 page01Edata[]= { /* 1E00 (3 weights per char) */
+static const uint16 page01Edata[]= { /* 1E00 (3 weights per char) */
0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E4A,0x0000,0x0000,
0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000,
0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E60,0x0000,0x0000,
@@ -2490,7 +2489,7 @@ uint16 page01Edata[]= { /* 1E00 (3 weigh
0xFBC0,0x9EFC,0x0000, 0xFBC0,0x9EFD,0x0000, 0xFBC0,0x9EFE,0x0000,
0xFBC0,0x9EFF,0x0000 };
-uint16 page01Fdata[]= { /* 1F00 (3 weights per char) */
+static const uint16 page01Fdata[]= { /* 1F00 (3 weights per char) */
0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000,
0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000,
0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000,
@@ -2578,7 +2577,7 @@ uint16 page01Fdata[]= { /* 1F00 (3 weigh
0x1109,0x0000,0x0000, 0x020D,0x0000,0x0000, 0x0218,0x0000,0x0000,
0xFBC0,0x9FFF,0x0000 };
-uint16 page020data[]= { /* 2000 (5 weights per char) */
+static const uint16 page020data[]= { /* 2000 (5 weights per char) */
0x0209,0x0000,0x0000,0x0000,0x0000,
0x0209,0x0000,0x0000,0x0000,0x0000,
0x0209,0x0000,0x0000,0x0000,0x0000,
@@ -2837,7 +2836,7 @@ uint16 page020data[]= { /* 2000 (5 weigh
0xFBC0,0xA0FF,0x0000,0x0000,0x0000
};
-uint16 page021data[]= { /* 2100 (5 weights per char) */
+static const uint16 page021data[]= { /* 2100 (5 weights per char) */
0x0E33,0x02CC,0x0E60,0x0000,0x0000,
0x0E33,0x02CC,0x0FEA,0x0000,0x0000,
0x0E60,0x0000,0x0000,0x0000,0x0000,
@@ -3096,7 +3095,7 @@ uint16 page021data[]= { /* 2100 (5 weigh
0x0417,0x0000,0x0000,0x0000,0x0000
};
-uint16 page022data[]= { /* 2200 (4 weights per char) */
+static const uint16 page022data[]= { /* 2200 (4 weights per char) */
0x0418,0x0000,0x0000,0x0000, 0x0419,0x0000,0x0000,0x0000,
0x041A,0x0000,0x0000,0x0000, 0x041B,0x0000,0x0000,0x0000,
0x041B,0x0000,0x0000,0x0000, 0x041C,0x0000,0x0000,0x0000,
@@ -3227,7 +3226,7 @@ uint16 page022data[]= { /* 2200 (4 weigh
0x04F9,0x0000,0x0000,0x0000, 0x04FA,0x0000,0x0000,0x0000
};
-uint16 page023data[]= { /* 2300 (3 weights per char) */
+static const uint16 page023data[]= { /* 2300 (3 weights per char) */
0x04FB,0x0000,0x0000, 0x04FC,0x0000,0x0000, 0x04FD,0x0000,0x0000,
0x04FE,0x0000,0x0000, 0x04FF,0x0000,0x0000, 0x0500,0x0000,0x0000,
0x0501,0x0000,0x0000, 0x0502,0x0000,0x0000, 0x0503,0x0000,0x0000,
@@ -3315,7 +3314,7 @@ uint16 page023data[]= { /* 2300 (3 weigh
0xFBC0,0xA3FC,0x0000, 0xFBC0,0xA3FD,0x0000, 0xFBC0,0xA3FE,0x0000,
0xFBC0,0xA3FF,0x0000 };
-uint16 page024data[]= { /* 2400 (5 weights per char) */
+static const uint16 page024data[]= { /* 2400 (5 weights per char) */
0x05CA,0x0000,0x0000,0x0000,0x0000,
0x05CB,0x0000,0x0000,0x0000,0x0000,
0x05CC,0x0000,0x0000,0x0000,0x0000,
@@ -3574,7 +3573,7 @@ uint16 page024data[]= { /* 2400 (5 weigh
0x0E29,0x0000,0x0000,0x0000,0x0000
};
-uint16 page025data[]= { /* 2500 (2 weights per char) */
+static const uint16 page025data[]= { /* 2500 (2 weights per char) */
0x05FC,0x0000, 0x05FD,0x0000, 0x05FE,0x0000, 0x05FF,0x0000,
0x0600,0x0000, 0x0601,0x0000, 0x0602,0x0000, 0x0603,0x0000,
0x0604,0x0000, 0x0605,0x0000, 0x0606,0x0000, 0x0607,0x0000,
@@ -3641,7 +3640,7 @@ uint16 page025data[]= { /* 2500 (2 weigh
0x06F8,0x0000, 0x06F9,0x0000, 0x06FA,0x0000, 0x06FB,0x0000
};
-uint16 page026data[]= { /* 2600 (3 weights per char) */
+static const uint16 page026data[]= { /* 2600 (3 weights per char) */
0x06FC,0x0000,0x0000, 0x06FD,0x0000,0x0000, 0x06FE,0x0000,0x0000,
0x06FF,0x0000,0x0000, 0x0700,0x0000,0x0000, 0x0701,0x0000,0x0000,
0x0702,0x0000,0x0000, 0x0703,0x0000,0x0000, 0x0704,0x0000,0x0000,
@@ -3729,7 +3728,7 @@ uint16 page026data[]= { /* 2600 (3 weigh
0xFBC0,0xA6FC,0x0000, 0xFBC0,0xA6FD,0x0000, 0xFBC0,0xA6FE,0x0000,
0xFBC0,0xA6FF,0x0000 };
-uint16 page027data[]= { /* 2700 (3 weights per char) */
+static const uint16 page027data[]= { /* 2700 (3 weights per char) */
0xFBC0,0xA700,0x0000, 0x077C,0x0000,0x0000, 0x077D,0x0000,0x0000,
0x077E,0x0000,0x0000, 0x077F,0x0000,0x0000, 0xFBC0,0xA705,0x0000,
0x0780,0x0000,0x0000, 0x0781,0x0000,0x0000, 0x0782,0x0000,0x0000,
@@ -3817,7 +3816,7 @@ uint16 page027data[]= { /* 2700 (3 weigh
0x0834,0x0000,0x0000, 0x0835,0x0000,0x0000, 0x0836,0x0000,0x0000,
0x0837,0x0000,0x0000 };
-uint16 page028data[]= { /* 2800 (2 weights per char) */
+static const uint16 page028data[]= { /* 2800 (2 weights per char) */
0x0A29,0x0000, 0x0A2A,0x0000, 0x0A2B,0x0000, 0x0A2C,0x0000,
0x0A2D,0x0000, 0x0A2E,0x0000, 0x0A2F,0x0000, 0x0A30,0x0000,
0x0A31,0x0000, 0x0A32,0x0000, 0x0A33,0x0000, 0x0A34,0x0000,
@@ -3884,7 +3883,7 @@ uint16 page028data[]= { /* 2800 (2 weigh
0x0B25,0x0000, 0x0B26,0x0000, 0x0B27,0x0000, 0x0B28,0x0000
};
-uint16 page029data[]= { /* 2900 (2 weights per char) */
+static const uint16 page029data[]= { /* 2900 (2 weights per char) */
0x0838,0x0000, 0x0839,0x0000, 0x083A,0x0000, 0x083B,0x0000,
0x083C,0x0000, 0x083D,0x0000, 0x083E,0x0000, 0x083F,0x0000,
0x0840,0x0000, 0x0841,0x0000, 0x0842,0x0000, 0x0843,0x0000,
@@ -3951,7 +3950,7 @@ uint16 page029data[]= { /* 2900 (2 weigh
0x0296,0x0000, 0x0297,0x0000, 0x091E,0x0000, 0x091F,0x0000
};
-uint16 page02Adata[]= { /* 2A00 (5 weights per char) */
+static const uint16 page02Adata[]= { /* 2A00 (5 weights per char) */
0x0920,0x0000,0x0000,0x0000,0x0000,
0x0921,0x0000,0x0000,0x0000,0x0000,
0x0922,0x0000,0x0000,0x0000,0x0000,
@@ -4210,7 +4209,7 @@ uint16 page02Adata[]= { /* 2A00 (5 weigh
0x0A1A,0x0000,0x0000,0x0000,0x0000
};
-uint16 page02Bdata[]= { /* 2B00 (3 weights per char) */
+static const uint16 page02Bdata[]= { /* 2B00 (3 weights per char) */
0x0A1B,0x0000,0x0000, 0x0A1C,0x0000,0x0000, 0x0A1D,0x0000,0x0000,
0x0A1E,0x0000,0x0000, 0x0A1F,0x0000,0x0000, 0x0A20,0x0000,0x0000,
0x0A21,0x0000,0x0000, 0x0A22,0x0000,0x0000, 0x0A23,0x0000,0x0000,
@@ -4298,7 +4297,7 @@ uint16 page02Bdata[]= { /* 2B00 (3 weigh
0xFBC0,0xABFC,0x0000, 0xFBC0,0xABFD,0x0000, 0xFBC0,0xABFE,0x0000,
0xFBC0,0xABFF,0x0000 };
-uint16 page02Edata[]= { /* 2E00 (3 weights per char) */
+static const uint16 page02Edata[]= { /* 2E00 (3 weights per char) */
0xFBC0,0xAE00,0x0000, 0xFBC0,0xAE01,0x0000, 0xFBC0,0xAE02,0x0000,
0xFBC0,0xAE03,0x0000, 0xFBC0,0xAE04,0x0000, 0xFBC0,0xAE05,0x0000,
0xFBC0,0xAE06,0x0000, 0xFBC0,0xAE07,0x0000, 0xFBC0,0xAE08,0x0000,
@@ -4386,7 +4385,7 @@ uint16 page02Edata[]= { /* 2E00 (3 weigh
0xFBC0,0xAEFC,0x0000, 0xFBC0,0xAEFD,0x0000, 0xFBC0,0xAEFE,0x0000,
0xFBC0,0xAEFF,0x0000 };
-uint16 page02Fdata[]= { /* 2F00 (3 weights per char) */
+static const uint16 page02Fdata[]= { /* 2F00 (3 weights per char) */
0xFB40,0xCE00,0x0000, 0xFB40,0xCE28,0x0000, 0xFB40,0xCE36,0x0000,
0xFB40,0xCE3F,0x0000, 0xFB40,0xCE59,0x0000, 0xFB40,0xCE85,0x0000,
0xFB40,0xCE8C,0x0000, 0xFB40,0xCEA0,0x0000, 0xFB40,0xCEBA,0x0000,
@@ -4474,7 +4473,7 @@ uint16 page02Fdata[]= { /* 2F00 (3 weigh
0xFBC0,0xAFFC,0x0000, 0xFBC0,0xAFFD,0x0000, 0xFBC0,0xAFFE,0x0000,
0xFBC0,0xAFFF,0x0000 };
-uint16 page030data[]= { /* 3000 (3 weights per char) */
+static const uint16 page030data[]= { /* 3000 (3 weights per char) */
0x0209,0x0000,0x0000, 0x0237,0x0000,0x0000, 0x0266,0x0000,0x0000,
0x02E2,0x0000,0x0000, 0x0DBB,0x0000,0x0000, 0x0E05,0x0000,0x0000,
0x1E5D,0x1E73,0x0000, 0x0E29,0x0000,0x0000, 0x02AE,0x0000,0x0000,
@@ -4562,7 +4561,7 @@ uint16 page030data[]= { /* 3000 (3 weigh
0x0E0B,0x0000,0x0000, 0x0E0C,0x0000,0x0000, 0x0E0C,0x0000,0x0000,
0x1E5B,0x1E65,0x0000 };
-uint16 page031data[]= { /* 3100 (3 weights per char) */
+static const uint16 page031data[]= { /* 3100 (3 weights per char) */
0xFBC0,0xB100,0x0000, 0xFBC0,0xB101,0x0000, 0xFBC0,0xB102,0x0000,
0xFBC0,0xB103,0x0000, 0xFBC0,0xB104,0x0000, 0x1E82,0x0000,0x0000,
0x1E83,0x0000,0x0000, 0x1E84,0x0000,0x0000, 0x1E85,0x0000,0x0000,
@@ -4650,7 +4649,7 @@ uint16 page031data[]= { /* 3100 (3 weigh
0x1E79,0x0000,0x0000, 0x1E7A,0x0000,0x0000, 0x1E7B,0x0000,0x0000,
0x1E7C,0x0000,0x0000 };
-uint16 page032data[]= { /* 3200 (8 weights per char) */
+static const uint16 page032data[]= { /* 3200 (8 weights per char) */
0x0288,0x1D62,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0288,0x1D64,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0288,0x1D65,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000,
@@ -4909,7 +4908,7 @@ uint16 page032data[]= { /* 3200 (8 weigh
0xFBC0,0xB2FF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
};
-uint16 page033data[]= { /* 3300 (9 weights per char) */
+static const uint16 page033data[]= { /* 3300 (9 weights per char) */
0x1E52,0x1E6B,0x0E0B,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000,
0x1E52,0x1E7A,0x1E6D,0x1E52,0x0000,0x0000,0x0000,0x0000,0x0000,
0x1E52,0x1E81,0x1E6E,0x1E52,0x0000,0x0000,0x0000,0x0000,0x0000,
@@ -5168,7 +5167,7 @@ uint16 page033data[]= { /* 3300 (9 weigh
0x0EC1,0x0E33,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
};
-uint16 page04Ddata[]= { /* 4D00 (3 weights per char) */
+static const uint16 page04Ddata[]= { /* 4D00 (3 weights per char) */
0xFB80,0xCD00,0x0000, 0xFB80,0xCD01,0x0000, 0xFB80,0xCD02,0x0000,
0xFB80,0xCD03,0x0000, 0xFB80,0xCD04,0x0000, 0xFB80,0xCD05,0x0000,
0xFB80,0xCD06,0x0000, 0xFB80,0xCD07,0x0000, 0xFB80,0xCD08,0x0000,
@@ -5256,7 +5255,7 @@ uint16 page04Ddata[]= { /* 4D00 (3 weigh
0x0B73,0x0000,0x0000, 0x0B74,0x0000,0x0000, 0x0B75,0x0000,0x0000,
0x0B76,0x0000,0x0000 };
-uint16 page0A0data[]= { /* A000 (2 weights per char) */
+static const uint16 page0A0data[]= { /* A000 (2 weights per char) */
0x1EB1,0x0000, 0x1EB2,0x0000, 0x1EB3,0x0000, 0x1EB4,0x0000,
0x1EB5,0x0000, 0x1EB6,0x0000, 0x1EB7,0x0000, 0x1EB8,0x0000,
0x1EB9,0x0000, 0x1EBA,0x0000, 0x1EBB,0x0000, 0x1EBC,0x0000,
@@ -5323,7 +5322,7 @@ uint16 page0A0data[]= { /* A000 (2 weigh
0x1FAD,0x0000, 0x1FAE,0x0000, 0x1FAF,0x0000, 0x1FB0,0x0000
};
-uint16 page0A1data[]= { /* A100 (2 weights per char) */
+static const uint16 page0A1data[]= { /* A100 (2 weights per char) */
0x1FB1,0x0000, 0x1FB2,0x0000, 0x1FB3,0x0000, 0x1FB4,0x0000,
0x1FB5,0x0000, 0x1FB6,0x0000, 0x1FB7,0x0000, 0x1FB8,0x0000,
0x1FB9,0x0000, 0x1FBA,0x0000, 0x1FBB,0x0000, 0x1FBC,0x0000,
@@ -5390,7 +5389,7 @@ uint16 page0A1data[]= { /* A100 (2 weigh
0x20AD,0x0000, 0x20AE,0x0000, 0x20AF,0x0000, 0x20B0,0x0000
};
-uint16 page0A2data[]= { /* A200 (2 weights per char) */
+static const uint16 page0A2data[]= { /* A200 (2 weights per char) */
0x20B1,0x0000, 0x20B2,0x0000, 0x20B3,0x0000, 0x20B4,0x0000,
0x20B5,0x0000, 0x20B6,0x0000, 0x20B7,0x0000, 0x20B8,0x0000,
0x20B9,0x0000, 0x20BA,0x0000, 0x20BB,0x0000, 0x20BC,0x0000,
@@ -5457,7 +5456,7 @@ uint16 page0A2data[]= { /* A200 (2 weigh
0x21AD,0x0000, 0x21AE,0x0000, 0x21AF,0x0000, 0x21B0,0x0000
};
-uint16 page0A3data[]= { /* A300 (2 weights per char) */
+static const uint16 page0A3data[]= { /* A300 (2 weights per char) */
0x21B1,0x0000, 0x21B2,0x0000, 0x21B3,0x0000, 0x21B4,0x0000,
0x21B5,0x0000, 0x21B6,0x0000, 0x21B7,0x0000, 0x21B8,0x0000,
0x21B9,0x0000, 0x21BA,0x0000, 0x21BB,0x0000, 0x21BC,0x0000,
@@ -5524,7 +5523,7 @@ uint16 page0A3data[]= { /* A300 (2 weigh
0x22AD,0x0000, 0x22AE,0x0000, 0x22AF,0x0000, 0x22B0,0x0000
};
-uint16 page0A4data[]= { /* A400 (3 weights per char) */
+static const uint16 page0A4data[]= { /* A400 (3 weights per char) */
0x22B1,0x0000,0x0000, 0x22B2,0x0000,0x0000, 0x22B3,0x0000,0x0000,
0x22B4,0x0000,0x0000, 0x22B5,0x0000,0x0000, 0x22B6,0x0000,0x0000,
0x22B7,0x0000,0x0000, 0x22B8,0x0000,0x0000, 0x22B9,0x0000,0x0000,
@@ -5612,7 +5611,7 @@ uint16 page0A4data[]= { /* A400 (3 weigh
0xFBC1,0xA4FC,0x0000, 0xFBC1,0xA4FD,0x0000, 0xFBC1,0xA4FE,0x0000,
0xFBC1,0xA4FF,0x0000 };
-uint16 page0F9data[]= { /* F900 (3 weights per char) */
+static const uint16 page0F9data[]= { /* F900 (3 weights per char) */
0xFB41,0x8C48,0x0000, 0xFB40,0xE6F4,0x0000, 0xFB41,0x8ECA,0x0000,
0xFB41,0x8CC8,0x0000, 0xFB40,0xEED1,0x0000, 0xFB40,0xCE32,0x0000,
0xFB40,0xD3E5,0x0000, 0xFB41,0x9F9C,0x0000, 0xFB41,0x9F9C,0x0000,
@@ -5700,7 +5699,7 @@ uint16 page0F9data[]= { /* F900 (3 weigh
0xFB41,0x8B58,0x0000, 0xFB40,0xCEC0,0x0000, 0xFB41,0x8336,0x0000,
0xFB40,0xD23A,0x0000 };
-uint16 page0FAdata[]= { /* FA00 (3 weights per char) */
+static const uint16 page0FAdata[]= { /* FA00 (3 weights per char) */
0xFB40,0xD207,0x0000, 0xFB40,0xDEA6,0x0000, 0xFB40,0xE2D3,0x0000,
0xFB40,0xFCD6,0x0000, 0xFB40,0xDB85,0x0000, 0xFB40,0xED1E,0x0000,
0xFB40,0xE6B4,0x0000, 0xFB41,0x8F3B,0x0000, 0xFB41,0x884C,0x0000,
@@ -5788,7 +5787,7 @@ uint16 page0FAdata[]= { /* FA00 (3 weigh
0xFBC1,0xFAFC,0x0000, 0xFBC1,0xFAFD,0x0000, 0xFBC1,0xFAFE,0x0000,
0xFBC1,0xFAFF,0x0000 };
-uint16 page0FBdata[]= { /* FB00 (4 weights per char) */
+static const uint16 page0FBdata[]= { /* FB00 (4 weights per char) */
0x0EB9,0x0EB9,0x0000,0x0000, 0x0EB9,0x0EFB,0x0000,0x0000,
0x0EB9,0x0F2E,0x0000,0x0000, 0x0EB9,0x0EB9,0x0EFB,0x0000,
0x0EB9,0x0EB9,0x0F2E,0x0000, 0x0FEA,0x1002,0x0000,0x0000,
@@ -5919,7 +5918,7 @@ uint16 page0FBdata[]= { /* FB00 (4 weigh
0x13C9,0x0000,0x0000,0x0000, 0x13C9,0x0000,0x0000,0x0000
};
-uint16 page0FCdata[]= { /* FC00 (3 weights per char) */
+static const uint16 page0FCdata[]= { /* FC00 (3 weights per char) */
0x134F,0x135E,0x0000, 0x134F,0x1364,0x0000, 0x134F,0x13B0,0x0000,
0x134F,0x13C7,0x0000, 0x134F,0x13C8,0x0000, 0x1352,0x135E,0x0000,
0x1352,0x1364,0x0000, 0x1352,0x1365,0x0000, 0x1352,0x13B0,0x0000,
@@ -6007,7 +6006,7 @@ uint16 page0FCdata[]= { /* FC00 (3 weigh
0x1381,0x13C8,0x0000, 0x1382,0x13C7,0x0000, 0x1382,0x13C8,0x0000,
0x1364,0x13C7,0x0000 };
-uint16 page0FDdata[]= { /* FD00 (9 weights per char) */
+static const uint16 page0FDdata[]= { /* FD00 (9 weights per char) */
0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x135E,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
@@ -6266,7 +6265,7 @@ uint16 page0FDdata[]= { /* FD00 (9 weigh
0xFBC1,0xFDFF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
};
-uint16 page0FEdata[]= { /* FE00 (3 weights per char) */
+static const uint16 page0FEdata[]= { /* FE00 (3 weights per char) */
0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,
@@ -6354,7 +6353,7 @@ uint16 page0FEdata[]= { /* FE00 (3 weigh
0x13AB,0x1350,0x0000, 0xFBC1,0xFEFD,0x0000, 0xFBC1,0xFEFE,0x0000,
0x0000,0x0000,0x0000 };
-uint16 page0FFdata[]= { /* FF00 (3 weights per char) */
+static const uint16 page0FFdata[]= { /* FF00 (3 weights per char) */
0xFBC1,0xFF00,0x0000, 0x0251,0x0000,0x0000, 0x027E,0x0000,0x0000,
0x02D2,0x0000,0x0000, 0x0E0F,0x0000,0x0000, 0x02D3,0x0000,0x0000,
0x02CF,0x0000,0x0000, 0x0277,0x0000,0x0000, 0x0288,0x0000,0x0000,
@@ -6442,7 +6441,7 @@ uint16 page0FFdata[]= { /* FF00 (3 weigh
0x0DC5,0x0000,0x0000, 0x0DC6,0x0000,0x0000, 0xFBC1,0xFFFE,0x0000,
0xFBC1,0xFFFF,0x0000 };
-uchar uca_length[256]={
+static const uchar uca_length[256]={
4,3,3,4,3,3,3,3,0,3,3,3,3,3,3,3,
3,3,3,3,3,2,3,3,3,3,0,0,0,3,3,3,
5,5,4,3,5,2,3,3,2,2,5,3,0,0,3,3,
@@ -6460,7 +6459,8 @@ uchar uca_length[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,3,3,4,3,9,3,3
};
-uint16 *uca_weight[256]={
+
+static const uint16 *const uca_weight[256]={
page000data,page001data,page002data,page003data,
page004data,page005data,page006data,page007data,
NULL ,page009data,page00Adata,page00Bdata,
@@ -6740,9 +6740,9 @@ typedef struct my_uca_scanner_st
const uint16 *wbeg; /* Beginning of the current weight string */
const uchar *sbeg; /* Beginning of the input string */
const uchar *send; /* End of the input string */
- uchar *uca_length;
- uint16 **uca_weight;
- MY_CONTRACTIONS *contractions;
+ const uchar *uca_length;
+ const uint16 * const *uca_weight;
+ const MY_CONTRACTIONS *contractions;
uint16 implicit[2];
int page;
int code;
@@ -6760,7 +6760,7 @@ typedef struct my_uca_scanner_handler_st
int (*next)(my_uca_scanner *scanner);
} my_uca_scanner_handler;
-static uint16 nochar[]= {0,0};
+static const uint16 nochar[]= {0,0};
/********** Helper functions to handle contraction ************/
@@ -6792,10 +6792,10 @@ my_uca_add_contraction_flag(CHARSET_INFO
*/
static MY_CONTRACTION *
-my_uca_add_contraction(CHARSET_INFO *cs,
+my_uca_add_contraction(struct charset_info_st *cs,
my_wc_t *wc, int len __attribute__((unused)))
{
- MY_CONTRACTIONS *list= cs->contractions;
+ MY_CONTRACTIONS *list= (MY_CONTRACTIONS*) cs->contractions;
MY_CONTRACTION *next= &list->item[list->nitems];
DBUG_ASSERT(len == 2); /* We currently support only contraction2 */
next->ch[0]= wc[0];
@@ -6818,20 +6818,24 @@ my_uca_add_contraction(CHARSET_INFO *cs,
*/
static my_bool
-my_uca_alloc_contractions(CHARSET_INFO *cs, void *(*alloc)(size_t), size_t n)
+my_uca_alloc_contractions(struct charset_info_st *cs,
+ void *(*alloc)(size_t), size_t n)
{
uint size= n * sizeof(MY_CONTRACTION);
- if (!(cs->contractions= (*alloc)(sizeof(MY_CONTRACTIONS))))
+ MY_CONTRACTIONS *contractions;
+
+ if (!(cs->contractions= contractions= (*alloc)(sizeof(MY_CONTRACTIONS))))
return 1;
- bzero(cs->contractions, sizeof(MY_CONTRACTIONS));
- if (!(cs->contractions->item= (*alloc)(size)) ||
- !(cs->contractions->flags= (char*) (*alloc)(MY_UCA_CNT_FLAG_SIZE)))
+ bzero(contractions, sizeof(MY_CONTRACTIONS));
+ if (!(contractions->item= (*alloc)(size)) ||
+ !(contractions->flags= (char*) (*alloc)(MY_UCA_CNT_FLAG_SIZE)))
return 1;
- bzero((void*) cs->contractions->item, size);
- bzero((void*) cs->contractions->flags, MY_UCA_CNT_FLAG_SIZE);
+ bzero(contractions->item, size);
+ bzero(contractions->flags, MY_UCA_CNT_FLAG_SIZE);
return 0;
}
+
#ifdef HAVE_CHARSET_ucs2
/*
Initialize collation weight scanner
@@ -6939,8 +6943,8 @@ static int my_uca_scanner_next_ucs2(my_u
do
{
- uint16 **ucaw= scanner->uca_weight;
- uchar *ucal= scanner->uca_length;
+ const uint16 *const *ucaw= scanner->uca_weight;
+ const uchar *ucal= scanner->uca_length;
if (scanner->sbeg > scanner->send)
return -1;
@@ -6955,7 +6959,7 @@ static int my_uca_scanner_next_ucs2(my_u
if (my_uca_can_be_contraction_head(scanner->cs, wc1))
{
- uint16 *cweight;
+ const uint16 *cweight;
my_wc_t wc2= (((my_wc_t) scanner->sbeg[0]) << 8) | scanner->sbeg[1];
if (my_uca_can_be_contraction_tail(scanner->cs, wc2) &&
(cweight= my_uca_contraction2_weight(scanner->cs,
@@ -7036,8 +7040,8 @@ static int my_uca_scanner_next_any(my_uc
do
{
- uint16 **ucaw= scanner->uca_weight;
- uchar *ucal= scanner->uca_length;
+ const uint16 *const *ucaw= scanner->uca_weight;
+ const uchar *ucal= scanner->uca_length;
my_wc_t wc;
int mb_len;
@@ -7054,7 +7058,7 @@ static int my_uca_scanner_next_any(my_uc
my_uca_can_be_contraction_head(scanner->cs, wc))
{
my_wc_t wc2;
- uint16 *cweight;
+ const uint16 *cweight;
if (((mb_len= scanner->cs->cset->mb_wc(scanner->cs, &wc2,
scanner->sbeg,
@@ -7117,14 +7121,14 @@ static my_uca_scanner_handler my_any_uca
or NULL if this page does not have implicit weights.
*/
-static inline uint16 *
+static inline const uint16 *
my_char_weight_addr(CHARSET_INFO *cs, uint wc)
{
uint page= (wc >> 8);
uint ofst= wc & 0xFF;
- return cs->sort_order_big[page] ?
- cs->sort_order_big[page] + ofst * cs->sort_order[page] :
- NULL;
+ return (cs->sort_order_big[page] ?
+ cs->sort_order_big[page] + ofst * cs->sort_order[page] :
+ 0);
}
@@ -7414,12 +7418,12 @@ static int my_uca_charcmp(CHARSET_INFO *
{
size_t page1= wc1 >> MY_UCA_PSHIFT;
size_t page2= wc2 >> MY_UCA_PSHIFT;
- uchar *ucal= cs->sort_order;
- uint16 **ucaw= cs->sort_order_big;
+ const uchar *ucal= cs->sort_order;
+ const uint16 *const *ucaw= cs->sort_order_big;
size_t length1= ucal[page1];
size_t length2= ucal[page2];
- uint16 *weight1= ucaw[page1] + (wc1 & MY_UCA_CMASK) * ucal[page1];
- uint16 *weight2= ucaw[page2] + (wc2 & MY_UCA_CMASK) * ucal[page2];
+ const uint16 *weight1= ucaw[page1] + (wc1 & MY_UCA_CMASK) * ucal[page1];
+ const uint16 *weight2= ucaw[page2] + (wc2 & MY_UCA_CMASK) * ucal[page2];
if (!weight1 || !weight2)
return wc1 != wc2;
@@ -7451,9 +7455,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs,
int result= -1; /* Not found, using wildcards */
my_wc_t s_wc, w_wc;
int scan;
- 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)
{
@@ -7948,7 +7950,8 @@ static int my_coll_rule_parse(MY_COLL_RU
default weights.
*/
-static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t))
+static my_bool create_tailoring(struct charset_info_st *cs,
+ void *(*alloc)(size_t))
{
MY_COLL_RULE rule[MY_MAX_COLL_RULE];
MY_COLL_RULE *r, *rfirst, *rlast;
@@ -7956,7 +7959,7 @@ static my_bool create_tailoring(CHARSET_
uchar *newlengths;
uint16 **newweights;
const uchar *deflengths= uca_length;
- uint16 **defweights= uca_weight;
+ const uint16 *const *defweights= uca_weight;
int rc, i;
int ncontractions= 0;
@@ -8052,11 +8055,11 @@ static my_bool create_tailoring(CHARSET_
for (i= 0; i < 256 ; i++)
{
if (!newweights[i])
- newweights[i]= defweights[i];
+ ((const uint16**) newweights)[i]= defweights[i];
}
cs->sort_order= newlengths;
- cs->sort_order_big= newweights;
+ cs->sort_order_big= (const uint16**) newweights;
cs->contractions= NULL;
/* Now process contractions */
@@ -8090,7 +8093,8 @@ static my_bool create_tailoring(CHARSET_
Should work for any character set.
*/
-static my_bool my_coll_init_uca(CHARSET_INFO *cs, void *(*alloc)(size_t))
+static my_bool my_coll_init_uca(struct charset_info_st *cs,
+ void *(*alloc)(size_t))
{
cs->pad_char= ' ';
cs->ctype= my_charset_utf8_unicode_ci.ctype;
@@ -8185,7 +8189,7 @@ MY_COLLATION_HANDLER my_collation_ucs2_u
my_propagate_complex
};
-CHARSET_INFO my_charset_ucs2_unicode_ci=
+struct charset_info_st my_charset_ucs2_unicode_ci=
{
128,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8217,7 +8221,7 @@ CHARSET_INFO my_charset_ucs2_unicode_ci=
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_icelandic_uca_ci=
+struct charset_info_st my_charset_ucs2_icelandic_uca_ci=
{
129,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8249,7 +8253,7 @@ CHARSET_INFO my_charset_ucs2_icelandic_u
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_latvian_uca_ci=
+struct charset_info_st my_charset_ucs2_latvian_uca_ci=
{
130,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8281,7 +8285,7 @@ CHARSET_INFO my_charset_ucs2_latvian_uca
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_romanian_uca_ci=
+struct charset_info_st my_charset_ucs2_romanian_uca_ci=
{
131,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8313,7 +8317,7 @@ CHARSET_INFO my_charset_ucs2_romanian_uc
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_slovenian_uca_ci=
+struct charset_info_st my_charset_ucs2_slovenian_uca_ci=
{
132,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8345,7 +8349,7 @@ CHARSET_INFO my_charset_ucs2_slovenian_u
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_polish_uca_ci=
+struct charset_info_st my_charset_ucs2_polish_uca_ci=
{
133,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8377,7 +8381,7 @@ CHARSET_INFO my_charset_ucs2_polish_uca_
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_estonian_uca_ci=
+struct charset_info_st my_charset_ucs2_estonian_uca_ci=
{
134,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8409,7 +8413,7 @@ CHARSET_INFO my_charset_ucs2_estonian_uc
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_spanish_uca_ci=
+struct charset_info_st my_charset_ucs2_spanish_uca_ci=
{
135,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8441,7 +8445,7 @@ CHARSET_INFO my_charset_ucs2_spanish_uca
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_swedish_uca_ci=
+struct charset_info_st my_charset_ucs2_swedish_uca_ci=
{
136,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8473,7 +8477,7 @@ CHARSET_INFO my_charset_ucs2_swedish_uca
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_turkish_uca_ci=
+struct charset_info_st my_charset_ucs2_turkish_uca_ci=
{
137,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8505,7 +8509,7 @@ CHARSET_INFO my_charset_ucs2_turkish_uca
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_czech_uca_ci=
+struct charset_info_st my_charset_ucs2_czech_uca_ci=
{
138,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8538,7 +8542,7 @@ CHARSET_INFO my_charset_ucs2_czech_uca_c
};
-CHARSET_INFO my_charset_ucs2_danish_uca_ci=
+struct charset_info_st my_charset_ucs2_danish_uca_ci=
{
139,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8570,7 +8574,7 @@ CHARSET_INFO my_charset_ucs2_danish_uca_
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci=
+struct charset_info_st my_charset_ucs2_lithuanian_uca_ci=
{
140,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8602,7 +8606,7 @@ CHARSET_INFO my_charset_ucs2_lithuanian_
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_slovak_uca_ci=
+struct charset_info_st my_charset_ucs2_slovak_uca_ci=
{
141,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8634,7 +8638,7 @@ CHARSET_INFO my_charset_ucs2_slovak_uca_
&my_collation_ucs2_uca_handler
};
-CHARSET_INFO my_charset_ucs2_spanish2_uca_ci=
+struct charset_info_st my_charset_ucs2_spanish2_uca_ci=
{
142,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8667,7 +8671,7 @@ CHARSET_INFO my_charset_ucs2_spanish2_uc
};
-CHARSET_INFO my_charset_ucs2_roman_uca_ci=
+struct charset_info_st my_charset_ucs2_roman_uca_ci=
{
143,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8700,7 +8704,7 @@ CHARSET_INFO my_charset_ucs2_roman_uca_c
};
-CHARSET_INFO my_charset_ucs2_persian_uca_ci=
+struct charset_info_st my_charset_ucs2_persian_uca_ci=
{
144,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8733,7 +8737,7 @@ CHARSET_INFO my_charset_ucs2_persian_uca
};
-CHARSET_INFO my_charset_ucs2_esperanto_uca_ci=
+struct charset_info_st my_charset_ucs2_esperanto_uca_ci=
{
145,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8766,7 +8770,7 @@ CHARSET_INFO my_charset_ucs2_esperanto_u
};
-CHARSET_INFO my_charset_ucs2_hungarian_uca_ci=
+struct charset_info_st my_charset_ucs2_hungarian_uca_ci=
{
146,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
@@ -8799,7 +8803,7 @@ CHARSET_INFO my_charset_ucs2_hungarian_u
};
-CHARSET_INFO my_charset_ucs2_croatian_uca_ci=
+struct charset_info_st my_charset_ucs2_croatian_uca_ci=
{
149,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -8879,7 +8883,7 @@ static uchar ctype_utf8[] = {
extern MY_CHARSET_HANDLER my_charset_utf8_handler;
-CHARSET_INFO my_charset_utf8_unicode_ci=
+struct charset_info_st my_charset_utf8_unicode_ci=
{
192,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -8912,7 +8916,7 @@ CHARSET_INFO my_charset_utf8_unicode_ci=
};
-CHARSET_INFO my_charset_utf8_icelandic_uca_ci=
+struct charset_info_st my_charset_utf8_icelandic_uca_ci=
{
193,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -8944,7 +8948,7 @@ CHARSET_INFO my_charset_utf8_icelandic_u
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_latvian_uca_ci=
+struct charset_info_st my_charset_utf8_latvian_uca_ci=
{
194,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -8976,7 +8980,7 @@ CHARSET_INFO my_charset_utf8_latvian_uca
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_romanian_uca_ci=
+struct charset_info_st my_charset_utf8_romanian_uca_ci=
{
195,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9008,7 +9012,7 @@ CHARSET_INFO my_charset_utf8_romanian_uc
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_slovenian_uca_ci=
+struct charset_info_st my_charset_utf8_slovenian_uca_ci=
{
196,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9040,7 +9044,7 @@ CHARSET_INFO my_charset_utf8_slovenian_u
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_polish_uca_ci=
+struct charset_info_st my_charset_utf8_polish_uca_ci=
{
197,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9072,7 +9076,7 @@ CHARSET_INFO my_charset_utf8_polish_uca_
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_estonian_uca_ci=
+struct charset_info_st my_charset_utf8_estonian_uca_ci=
{
198,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9104,7 +9108,7 @@ CHARSET_INFO my_charset_utf8_estonian_uc
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_spanish_uca_ci=
+struct charset_info_st my_charset_utf8_spanish_uca_ci=
{
199,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9136,7 +9140,7 @@ CHARSET_INFO my_charset_utf8_spanish_uca
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_swedish_uca_ci=
+struct charset_info_st my_charset_utf8_swedish_uca_ci=
{
200,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9168,7 +9172,7 @@ CHARSET_INFO my_charset_utf8_swedish_uca
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_turkish_uca_ci=
+struct charset_info_st my_charset_utf8_turkish_uca_ci=
{
201,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9200,7 +9204,7 @@ CHARSET_INFO my_charset_utf8_turkish_uca
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_czech_uca_ci=
+struct charset_info_st my_charset_utf8_czech_uca_ci=
{
202,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9233,7 +9237,7 @@ CHARSET_INFO my_charset_utf8_czech_uca_c
};
-CHARSET_INFO my_charset_utf8_danish_uca_ci=
+struct charset_info_st my_charset_utf8_danish_uca_ci=
{
203,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9265,7 +9269,7 @@ CHARSET_INFO my_charset_utf8_danish_uca_
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_lithuanian_uca_ci=
+struct charset_info_st my_charset_utf8_lithuanian_uca_ci=
{
204,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9297,7 +9301,7 @@ CHARSET_INFO my_charset_utf8_lithuanian_
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_slovak_uca_ci=
+struct charset_info_st my_charset_utf8_slovak_uca_ci=
{
205,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9329,7 +9333,7 @@ CHARSET_INFO my_charset_utf8_slovak_uca_
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_spanish2_uca_ci=
+struct charset_info_st my_charset_utf8_spanish2_uca_ci=
{
206,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9361,7 +9365,7 @@ CHARSET_INFO my_charset_utf8_spanish2_uc
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_roman_uca_ci=
+struct charset_info_st my_charset_utf8_roman_uca_ci=
{
207,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9393,7 +9397,7 @@ CHARSET_INFO my_charset_utf8_roman_uca_c
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_persian_uca_ci=
+struct charset_info_st my_charset_utf8_persian_uca_ci=
{
208,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9425,7 +9429,7 @@ CHARSET_INFO my_charset_utf8_persian_uca
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_esperanto_uca_ci=
+struct charset_info_st my_charset_utf8_esperanto_uca_ci=
{
209,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9457,7 +9461,7 @@ CHARSET_INFO my_charset_utf8_esperanto_u
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_hungarian_uca_ci=
+struct charset_info_st my_charset_utf8_hungarian_uca_ci=
{
210,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9489,7 +9493,7 @@ CHARSET_INFO my_charset_utf8_hungarian_u
&my_collation_any_uca_handler
};
-CHARSET_INFO my_charset_utf8_croatian_uca_ci=
+struct charset_info_st my_charset_utf8_croatian_uca_ci=
{
213,0,0, /* number */
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
@@ -9584,11 +9588,11 @@ my_uca_can_be_contraction_tail(CHARSET_I
@retval ptr - contraction weight array
*/
-uint16 *
+const uint16 *
my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
{
- MY_CONTRACTIONS *list= cs->contractions;
- MY_CONTRACTION *c, *last;
+ const MY_CONTRACTIONS *list= cs->contractions;
+ const MY_CONTRACTION *c, *last;
for (c= list->item, last= &list->item[list->nitems]; c < last; c++)
{
if (c->ch[0] == wc1 && c->ch[1] == wc2)
=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c 2009-12-03 12:02:37 +0000
+++ b/strings/ctype-ucs2.c 2010-01-06 19:20:16 +0000
@@ -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_INF
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_IN
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_INF
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_INF
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_I
{
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_I
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_I
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_handl
};
-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,
=== modified file 'strings/ctype-ujis.c'
--- a/strings/ctype-ujis.c 2008-02-20 18:49:26 +0000
+++ b/strings/ctype-ujis.c 2010-01-06 19:20:16 +0000
@@ -32,7 +32,7 @@
#ifdef HAVE_CHARSET_ujis
-static uchar NEAR ctype_ujis[257] =
+static const uchar NEAR ctype_ujis[257] =
{
0, /* For standard library */
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */
@@ -69,7 +69,7 @@ static uchar NEAR ctype_ujis[257] =
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000,
};
-static uchar NEAR to_lower_ujis[]=
+static const uchar NEAR to_lower_ujis[]=
{
'\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_ujis[]=
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
};
-static uchar NEAR to_upper_ujis[]=
+static const uchar NEAR to_upper_ujis[]=
{
'\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_ujis[]=
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
};
-static uchar NEAR sort_order_ujis[]=
+static const uchar NEAR sort_order_ujis[]=
{
'\000','\001','\002','\003','\004','\005','\006','\007',
'\010','\011','\012','\013','\014','\015','\016','\017',
@@ -200,7 +200,7 @@ static uint mbcharlen_ujis(CHARSET_INFO
}
-static uint16 tab_jisx0201_uni[256]={
+static const uint16 tab_jisx0201_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,
@@ -269,7 +269,7 @@ my_wc_mb_jisx0201(CHARSET_INFO *cs __att
/* page 0 0x2121-0x217E */
-static uint16 tab_jisx0208_uni0[]={
+static const uint16 tab_jisx0208_uni0[]={
0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B,
0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,
0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,
@@ -284,7 +284,7 @@ static uint16 tab_jisx0208_uni0[]={
0x2606,0x2605,0x25CB,0x25CF,0x25CE,0x25C7};
/* page 1 0x2221-0x227E */
-static uint16 tab_jisx0208_uni1[]={
+static const uint16 tab_jisx0208_uni1[]={
0x25C6,0x25A1,0x25A0,0x25B3,0x25B2,0x25BD,0x25BC,0x203B,
0x3012,0x2192,0x2190,0x2191,0x2193,0x3013, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -299,7 +299,7 @@ static uint16 tab_jisx0208_uni1[]={
0x00B6, 0, 0, 0, 0,0x25EF};
/* page 2 0x2330-0x237A */
-static uint16 tab_jisx0208_uni2[]={
+static const uint16 tab_jisx0208_uni2[]={
0xFF10,0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17,
0xFF18,0xFF19, 0, 0, 0, 0, 0, 0,
0,0xFF21,0xFF22,0xFF23,0xFF24,0xFF25,0xFF26,0xFF27,
@@ -312,7 +312,7 @@ static uint16 tab_jisx0208_uni2[]={
0xFF58,0xFF59,0xFF5A};
/* page 3 0x2421-0x2473 */
-static uint16 tab_jisx0208_uni3[]={
+static const uint16 tab_jisx0208_uni3[]={
0x3041,0x3042,0x3043,0x3044,0x3045,0x3046,0x3047,0x3048,
0x3049,0x304A,0x304B,0x304C,0x304D,0x304E,0x304F,0x3050,
0x3051,0x3052,0x3053,0x3054,0x3055,0x3056,0x3057,0x3058,
@@ -326,7 +326,7 @@ static uint16 tab_jisx0208_uni3[]={
0x3091,0x3092,0x3093};
/* page 4 0x2521-0x2576 */
-static uint16 tab_jisx0208_uni4[]={
+static const uint16 tab_jisx0208_uni4[]={
0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8,
0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0,
0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8,
@@ -340,7 +340,7 @@ static uint16 tab_jisx0208_uni4[]={
0x30F1,0x30F2,0x30F3,0x30F4,0x30F5,0x30F6};
/* page 5 0x2621-0x2658 */
-static uint16 tab_jisx0208_uni5[]={
+static const uint16 tab_jisx0208_uni5[]={
0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,
0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,
0x03A1,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,0x03A8,0x03A9,
@@ -351,7 +351,7 @@ static uint16 tab_jisx0208_uni5[]={
};
/* page 6 0x2721-0x2771 */
-static uint16 tab_jisx0208_uni6[]={
+static const uint16 tab_jisx0208_uni6[]={
0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416,
0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,
@@ -365,7 +365,7 @@ static uint16 tab_jisx0208_uni6[]={
0x044F};
/* page 7 0x2821-0x2840 */
-static uint16 tab_jisx0208_uni7[]={
+static const uint16 tab_jisx0208_uni7[]={
0x2500,0x2502,0x250C,0x2510,0x2518,0x2514,0x251C,0x252C,
0x2524,0x2534,0x253C,0x2501,0x2503,0x250F,0x2513,0x251B,
0x2517,0x2523,0x2533,0x252B,0x253B,0x254B,0x2520,0x252F,
@@ -373,7 +373,7 @@ static uint16 tab_jisx0208_uni7[]={
};
/* page 8 0x3021-0x307E */
-static uint16 tab_jisx0208_uni8[]={
+static const uint16 tab_jisx0208_uni8[]={
0x4E9C,0x5516,0x5A03,0x963F,0x54C0,0x611B,0x6328,0x59F6,
0x9022,0x8475,0x831C,0x7A50,0x60AA,0x63E1,0x6E25,0x65ED,
0x8466,0x82A6,0x9BF5,0x6893,0x5727,0x65A1,0x6271,0x5B9B,
@@ -388,7 +388,7 @@ static uint16 tab_jisx0208_uni8[]={
0x59FB,0x5F15,0x98F2,0x6DEB,0x80E4,0x852D};
/* page 9 0x3121-0x317E */
-static uint16 tab_jisx0208_uni9[]={
+static const uint16 tab_jisx0208_uni9[]={
0x9662,0x9670,0x96A0,0x97FB,0x540B,0x53F3,0x5B87,0x70CF,
0x7FBD,0x8FC2,0x96E8,0x536F,0x9D5C,0x7ABA,0x4E11,0x7893,
0x81FC,0x6E26,0x5618,0x5504,0x6B1D,0x851A,0x9C3B,0x59E5,
@@ -403,7 +403,7 @@ static uint16 tab_jisx0208_uni9[]={
0x7525,0x51F9,0x592E,0x5965,0x5F80,0x5FDC};
/* page 10 0x3221-0x327E */
-static uint16 tab_jisx0208_uni10[]={
+static const uint16 tab_jisx0208_uni10[]={
0x62BC,0x65FA,0x6A2A,0x6B27,0x6BB4,0x738B,0x7FC1,0x8956,
0x9D2C,0x9D0E,0x9EC4,0x5CA1,0x6C96,0x837B,0x5104,0x5C4B,
0x61B6,0x81C6,0x6876,0x7261,0x4E59,0x4FFA,0x5378,0x6069,
@@ -418,7 +418,7 @@ static uint16 tab_jisx0208_uni10[]={
0x6094,0x6062,0x61D0,0x6212,0x62D0,0x6539};
/* page 11 0x3321-0x337E */
-static uint16 tab_jisx0208_uni11[]={
+static const uint16 tab_jisx0208_uni11[]={
0x9B41,0x6666,0x68B0,0x6D77,0x7070,0x754C,0x7686,0x7D75,
0x82A5,0x87F9,0x958B,0x968E,0x8C9D,0x51F1,0x52BE,0x5916,
0x54B3,0x5BB3,0x5D16,0x6168,0x6982,0x6DAF,0x788D,0x84CB,
@@ -433,7 +433,7 @@ static uint16 tab_jisx0208_uni11[]={
0x938C,0x565B,0x9D28,0x6822,0x8305,0x8431};
/* page 12 0x3421-0x347E */
-static uint16 tab_jisx0208_uni12[]={
+static const uint16 tab_jisx0208_uni12[]={
0x7CA5,0x5208,0x82C5,0x74E6,0x4E7E,0x4F83,0x51A0,0x5BD2,
0x520A,0x52D8,0x52E7,0x5DFB,0x559A,0x582A,0x59E6,0x5B8C,
0x5B98,0x5BDB,0x5E72,0x5E79,0x60A3,0x611F,0x6163,0x61BE,
@@ -448,7 +448,7 @@ static uint16 tab_jisx0208_uni12[]={
0x673A,0x65D7,0x65E2,0x671F,0x68CB,0x68C4};
/* page 13 0x3521-0x357E */
-static uint16 tab_jisx0208_uni13[]={
+static const uint16 tab_jisx0208_uni13[]={
0x6A5F,0x5E30,0x6BC5,0x6C17,0x6C7D,0x757F,0x7948,0x5B63,
0x7A00,0x7D00,0x5FBD,0x898F,0x8A18,0x8CB4,0x8D77,0x8ECC,
0x8F1D,0x98E2,0x9A0E,0x9B3C,0x4E80,0x507D,0x5100,0x5993,
@@ -463,7 +463,7 @@ static uint16 tab_jisx0208_uni13[]={
0x6F01,0x79A6,0x9B5A,0x4EA8,0x4EAB,0x4EAC};
/* page 14 0x3621-0x367E */
-static uint16 tab_jisx0208_uni14[]={
+static const uint16 tab_jisx0208_uni14[]={
0x4F9B,0x4FA0,0x50D1,0x5147,0x7AF6,0x5171,0x51F6,0x5354,
0x5321,0x537F,0x53EB,0x55AC,0x5883,0x5CE1,0x5F37,0x5F4A,
0x602F,0x6050,0x606D,0x631F,0x6559,0x6A4B,0x6CC1,0x72C2,
@@ -478,7 +478,7 @@ static uint16 tab_jisx0208_uni14[]={
0x9685,0x4E32,0x6ADB,0x91E7,0x5C51,0x5C48};
/* page 15 0x3721-0x377E */
-static uint16 tab_jisx0208_uni15[]={
+static const uint16 tab_jisx0208_uni15[]={
0x6398,0x7A9F,0x6C93,0x9774,0x8F61,0x7AAA,0x718A,0x9688,
0x7C82,0x6817,0x7E70,0x6851,0x936C,0x52F2,0x541B,0x85AB,
0x8A13,0x7FA4,0x8ECD,0x90E1,0x5366,0x8888,0x7941,0x4FC2,
@@ -493,7 +493,7 @@ static uint16 tab_jisx0208_uni15[]={
0x5ACC,0x5EFA,0x61B2,0x61F8,0x62F3,0x6372};
/* page 16 0x3821-0x387E */
-static uint16 tab_jisx0208_uni16[]={
+static const uint16 tab_jisx0208_uni16[]={
0x691C,0x6A29,0x727D,0x72AC,0x732E,0x7814,0x786F,0x7D79,
0x770C,0x80A9,0x898B,0x8B19,0x8CE2,0x8ED2,0x9063,0x9375,
0x967A,0x9855,0x9A13,0x9E78,0x5143,0x539F,0x53B3,0x5E7B,
@@ -508,7 +508,7 @@ static uint16 tab_jisx0208_uni16[]={
0x529F,0x52B9,0x52FE,0x539A,0x53E3,0x5411};
/* page 17 0x3921-0x397E */
-static uint16 tab_jisx0208_uni17[]={
+static const uint16 tab_jisx0208_uni17[]={
0x540E,0x5589,0x5751,0x57A2,0x597D,0x5B54,0x5B5D,0x5B8F,
0x5DE5,0x5DE7,0x5DF7,0x5E78,0x5E83,0x5E9A,0x5EB7,0x5F18,
0x6052,0x614C,0x6297,0x62D8,0x63A7,0x653B,0x6602,0x6643,
@@ -523,7 +523,7 @@ static uint16 tab_jisx0208_uni17[]={
0x7511,0x5FFD,0x60DA,0x9AA8,0x72DB,0x8FBC};
/* page 18 0x3A21-0x3A7E */
-static uint16 tab_jisx0208_uni18[]={
+static const uint16 tab_jisx0208_uni18[]={
0x6B64,0x9803,0x4ECA,0x56F0,0x5764,0x58BE,0x5A5A,0x6068,
0x61C7,0x660F,0x6606,0x6839,0x68B1,0x6DF7,0x75D5,0x7D3A,
0x826E,0x9B42,0x4E9B,0x4F50,0x53C9,0x5506,0x5D6F,0x5DE6,
@@ -538,7 +538,7 @@ static uint16 tab_jisx0208_uni18[]={
0x685C,0x9BAD,0x7B39,0x5319,0x518A,0x5237};
/* page 19 0x3B21-0x3B7E */
-static uint16 tab_jisx0208_uni19[]={
+static const uint16 tab_jisx0208_uni19[]={
0x5BDF,0x62F6,0x64AE,0x64E6,0x672D,0x6BBA,0x85A9,0x96D1,
0x7690,0x9BD6,0x634C,0x9306,0x9BAB,0x76BF,0x6652,0x4E09,
0x5098,0x53C2,0x5C71,0x60E8,0x6492,0x6563,0x685F,0x71E6,
@@ -553,7 +553,7 @@ static uint16 tab_jisx0208_uni19[]={
0x5150,0x5B57,0x5BFA,0x6148,0x6301,0x6642};
/* page 20 0x3C21-0x3C7E */
-static uint16 tab_jisx0208_uni20[]={
+static const uint16 tab_jisx0208_uni20[]={
0x6B21,0x6ECB,0x6CBB,0x723E,0x74BD,0x75D4,0x78C1,0x793A,
0x800C,0x8033,0x81EA,0x8494,0x8F9E,0x6C50,0x9E7F,0x5F0F,
0x8B58,0x9D2B,0x7AFA,0x8EF8,0x5B8D,0x96EB,0x4E03,0x53F1,
@@ -568,7 +568,7 @@ static uint16 tab_jisx0208_uni20[]={
0x6A39,0x7DAC,0x9700,0x56DA,0x53CE,0x5468};
/* page 21 0x3D21-0x3D7E */
-static uint16 tab_jisx0208_uni21[]={
+static const uint16 tab_jisx0208_uni21[]={
0x5B97,0x5C31,0x5DDE,0x4FEE,0x6101,0x62FE,0x6D32,0x79C0,
0x79CB,0x7D42,0x7E4D,0x7FD2,0x81ED,0x821F,0x8490,0x8846,
0x8972,0x8B90,0x8E74,0x8F2F,0x9031,0x914B,0x916C,0x96C6,
@@ -583,7 +583,7 @@ static uint16 tab_jisx0208_uni21[]={
0x5F90,0x6055,0x92E4,0x9664,0x50B7,0x511F};
/* page 22 0x3E21-0x3E7E */
-static uint16 tab_jisx0208_uni22[]={
+static const uint16 tab_jisx0208_uni22[]={
0x52DD,0x5320,0x5347,0x53EC,0x54E8,0x5546,0x5531,0x5617,
0x5968,0x59BE,0x5A3C,0x5BB5,0x5C06,0x5C0F,0x5C11,0x5C1A,
0x5E84,0x5E8A,0x5EE0,0x5F70,0x627F,0x6284,0x62DB,0x638C,
@@ -598,7 +598,7 @@ static uint16 tab_jisx0208_uni22[]={
0x8B72,0x91B8,0x9320,0x5631,0x57F4,0x98FE};
/* page 23 0x3F21-0x3F7E */
-static uint16 tab_jisx0208_uni23[]={
+static const uint16 tab_jisx0208_uni23[]={
0x62ED,0x690D,0x6B96,0x71ED,0x7E54,0x8077,0x8272,0x89E6,
0x98DF,0x8755,0x8FB1,0x5C3B,0x4F38,0x4FE1,0x4FB5,0x5507,
0x5A20,0x5BDD,0x5BE9,0x5FC3,0x614E,0x632F,0x65B0,0x664B,
@@ -613,7 +613,7 @@ static uint16 tab_jisx0208_uni23[]={
0x6749,0x6919,0x83C5,0x9817,0x96C0,0x88FE};
/* page 24 0x4021-0x407E */
-static uint16 tab_jisx0208_uni24[]={
+static const uint16 tab_jisx0208_uni24[]={
0x6F84,0x647A,0x5BF8,0x4E16,0x702C,0x755D,0x662F,0x51C4,
0x5236,0x52E2,0x59D3,0x5F81,0x6027,0x6210,0x653F,0x6574,
0x661F,0x6674,0x68F2,0x6816,0x6B63,0x6E05,0x7272,0x751F,
@@ -628,7 +628,7 @@ static uint16 tab_jisx0208_uni24[]={
0x714E,0x717D,0x65CB,0x7A7F,0x7BAD,0x7DDA};
/* page 25 0x4121-0x417E */
-static uint16 tab_jisx0208_uni25[]={
+static const uint16 tab_jisx0208_uni25[]={
0x7E4A,0x7FA8,0x817A,0x821B,0x8239,0x85A6,0x8A6E,0x8CCE,
0x8DF5,0x9078,0x9077,0x92AD,0x9291,0x9583,0x9BAE,0x524D,
0x5584,0x6F38,0x7136,0x5168,0x7985,0x7E55,0x81B3,0x7CCE,
@@ -643,7 +643,7 @@ static uint16 tab_jisx0208_uni25[]={
0x9397,0x971C,0x9A12,0x50CF,0x5897,0x618E};
/* page 26 0x4221-0x427E */
-static uint16 tab_jisx0208_uni26[]={
+static const uint16 tab_jisx0208_uni26[]={
0x81D3,0x8535,0x8D08,0x9020,0x4FC3,0x5074,0x5247,0x5373,
0x606F,0x6349,0x675F,0x6E2C,0x8DB3,0x901F,0x4FD7,0x5C5E,
0x8CCA,0x65CF,0x7D9A,0x5352,0x8896,0x5176,0x63C3,0x5B58,
@@ -658,7 +658,7 @@ static uint16 tab_jisx0208_uni26[]={
0x6FC1,0x8AFE,0x8338,0x51E7,0x86F8,0x53EA};
/* page 27 0x4321-0x437E */
-static uint16 tab_jisx0208_uni27[]={
+static const uint16 tab_jisx0208_uni27[]={
0x53E9,0x4F46,0x9054,0x8FB0,0x596A,0x8131,0x5DFD,0x7AEA,
0x8FBF,0x68DA,0x8C37,0x72F8,0x9C48,0x6A3D,0x8AB0,0x4E39,
0x5358,0x5606,0x5766,0x62C5,0x63A2,0x65E6,0x6B4E,0x6DE1,
@@ -673,7 +673,7 @@ static uint16 tab_jisx0208_uni27[]={
0x8CAF,0x4E01,0x5146,0x51CB,0x558B,0x5BF5};
/* page 28 0x4421-0x447E */
-static uint16 tab_jisx0208_uni28[]={
+static const uint16 tab_jisx0208_uni28[]={
0x5E16,0x5E33,0x5E81,0x5F14,0x5F35,0x5F6B,0x5FB4,0x61F2,
0x6311,0x66A2,0x671D,0x6F6E,0x7252,0x753A,0x773A,0x8074,
0x8139,0x8178,0x8776,0x8ABF,0x8ADC,0x8D85,0x8DF3,0x929A,
@@ -688,7 +688,7 @@ static uint16 tab_jisx0208_uni28[]={
0x7DE0,0x8247,0x8A02,0x8AE6,0x8E44,0x9013};
/* page 29 0x4521-0x457E */
-static uint16 tab_jisx0208_uni29[]={
+static const uint16 tab_jisx0208_uni29[]={
0x90B8,0x912D,0x91D8,0x9F0E,0x6CE5,0x6458,0x64E2,0x6575,
0x6EF4,0x7684,0x7B1B,0x9069,0x93D1,0x6EBA,0x54F2,0x5FB9,
0x64A4,0x8F4D,0x8FED,0x9244,0x5178,0x586B,0x5929,0x5C55,
@@ -703,7 +703,7 @@ static uint16 tab_jisx0208_uni29[]={
0x7B49,0x7B54,0x7B52,0x7CD6,0x7D71,0x5230};
/* page 30 0x4621-0x467E */
-static uint16 tab_jisx0208_uni30[]={
+static const uint16 tab_jisx0208_uni30[]={
0x8463,0x8569,0x85E4,0x8A0E,0x8B04,0x8C46,0x8E0F,0x9003,
0x900F,0x9419,0x9676,0x982D,0x9A30,0x95D8,0x50CD,0x52D5,
0x540C,0x5802,0x5C0E,0x61A7,0x649E,0x6D1E,0x77B3,0x7AE5,
@@ -718,7 +718,7 @@ static uint16 tab_jisx0208_uni30[]={
0x8089,0x8679,0x5EFF,0x65E5,0x4E73,0x5165};
/* page 31 0x4721-0x477E */
-static uint16 tab_jisx0208_uni31[]={
+static const uint16 tab_jisx0208_uni31[]={
0x5982,0x5C3F,0x97EE,0x4EFB,0x598A,0x5FCD,0x8A8D,0x6FE1,
0x79B0,0x7962,0x5BE7,0x8471,0x732B,0x71B1,0x5E74,0x5FF5,
0x637B,0x649A,0x71C3,0x7C98,0x4E43,0x5EFC,0x4E4B,0x57DC,
@@ -733,7 +733,7 @@ static uint16 tab_jisx0208_uni31[]={
0x6F20,0x7206,0x7E1B,0x83AB,0x99C1,0x9EA6};
/* page 32 0x4821-0x487E */
-static uint16 tab_jisx0208_uni32[]={
+static const uint16 tab_jisx0208_uni32[]={
0x51FD,0x7BB1,0x7872,0x7BB8,0x8087,0x7B48,0x6AE8,0x5E61,
0x808C,0x7551,0x7560,0x516B,0x9262,0x6E8C,0x767A,0x9197,
0x9AEA,0x4F10,0x7F70,0x629C,0x7B4F,0x95A5,0x9CE9,0x567A,
@@ -748,7 +748,7 @@ static uint16 tab_jisx0208_uni32[]={
0x5FAE,0x6787,0x6BD8,0x7435,0x7709,0x7F8E};
/* page 33 0x4921-0x497E */
-static uint16 tab_jisx0208_uni33[]={
+static const uint16 tab_jisx0208_uni33[]={
0x9F3B,0x67CA,0x7A17,0x5339,0x758B,0x9AED,0x5F66,0x819D,
0x83F1,0x8098,0x5F3C,0x5FC5,0x7562,0x7B46,0x903C,0x6867,
0x59EB,0x5A9B,0x7D10,0x767E,0x8B2C,0x4FF5,0x5F6A,0x6A19,
@@ -763,7 +763,7 @@ static uint16 tab_jisx0208_uni33[]={
0x8557,0x4F0F,0x526F,0x5FA9,0x5E45,0x670D};
/* page 34 0x4A21-0x4A7E */
-static uint16 tab_jisx0208_uni34[]={
+static const uint16 tab_jisx0208_uni34[]={
0x798F,0x8179,0x8907,0x8986,0x6DF5,0x5F17,0x6255,0x6CB8,
0x4ECF,0x7269,0x9B92,0x5206,0x543B,0x5674,0x58B3,0x61A4,
0x626E,0x711A,0x596E,0x7C89,0x7CDE,0x7D1B,0x96F0,0x6587,
@@ -778,7 +778,7 @@ static uint16 tab_jisx0208_uni34[]={
0x5E96,0x62B1,0x6367,0x653E,0x65B9,0x670B};
/* page 35 0x4B21-0x4B7E */
-static uint16 tab_jisx0208_uni35[]={
+static const uint16 tab_jisx0208_uni35[]={
0x6CD5,0x6CE1,0x70F9,0x7832,0x7E2B,0x80DE,0x82B3,0x840C,
0x84EC,0x8702,0x8912,0x8A2A,0x8C4A,0x90A6,0x92D2,0x98FD,
0x9CF3,0x9D6C,0x4E4F,0x4EA1,0x508D,0x5256,0x574A,0x59A8,
@@ -793,7 +793,7 @@ static uint16 tab_jisx0208_uni35[]={
0x4FAD,0x7E6D,0x9EBF,0x4E07,0x6162,0x6E80};
/* page 36 0x4C21-0x4C7E */
-static uint16 tab_jisx0208_uni36[]={
+static const uint16 tab_jisx0208_uni36[]={
0x6F2B,0x8513,0x5473,0x672A,0x9B45,0x5DF3,0x7B95,0x5CAC,
0x5BC6,0x871C,0x6E4A,0x84D1,0x7A14,0x8108,0x5999,0x7C8D,
0x6C11,0x7720,0x52D9,0x5922,0x7121,0x725F,0x77DB,0x9727,
@@ -808,7 +808,7 @@ static uint16 tab_jisx0208_uni36[]={
0x85AE,0x9453,0x6109,0x6108,0x6CB9,0x7652};
/* page 37 0x4D21-0x4D7E */
-static uint16 tab_jisx0208_uni37[]={
+static const uint16 tab_jisx0208_uni37[]={
0x8AED,0x8F38,0x552F,0x4F51,0x512A,0x52C7,0x53CB,0x5BA5,
0x5E7D,0x60A0,0x6182,0x63D6,0x6709,0x67DA,0x6E67,0x6D8C,
0x7336,0x7337,0x7531,0x7950,0x88D5,0x8A98,0x904A,0x9091,
@@ -823,7 +823,7 @@ static uint16 tab_jisx0208_uni37[]={
0x540F,0x5C65,0x674E,0x68A8,0x7406,0x7483};
/* page 38 0x4E21-0x4E7E */
-static uint16 tab_jisx0208_uni38[]={
+static const uint16 tab_jisx0208_uni38[]={
0x75E2,0x88CF,0x88E1,0x91CC,0x96E2,0x9678,0x5F8B,0x7387,
0x7ACB,0x844E,0x63A0,0x7565,0x5289,0x6D41,0x6E9C,0x7409,
0x7559,0x786B,0x7C92,0x9686,0x7ADC,0x9F8D,0x4FB6,0x616E,
@@ -838,7 +838,7 @@ static uint16 tab_jisx0208_uni38[]={
0x6190,0x6F23,0x7149,0x7C3E,0x7DF4,0x806F};
/* page 39 0x4F21-0x4F53 */
-static uint16 tab_jisx0208_uni39[]={
+static const uint16 tab_jisx0208_uni39[]={
0x84EE,0x9023,0x932C,0x5442,0x9B6F,0x6AD3,0x7089,0x8CC2,
0x8DEF,0x9732,0x52B4,0x5A41,0x5ECA,0x5F04,0x6717,0x697C,
0x6994,0x6D6A,0x6F0F,0x7262,0x72FC,0x7BED,0x8001,0x807E,
@@ -848,7 +848,7 @@ static uint16 tab_jisx0208_uni39[]={
0x6E7E,0x7897,0x8155};
/* page 40 0x5021-0x507E */
-static uint16 tab_jisx0208_uni40[]={
+static const uint16 tab_jisx0208_uni40[]={
0x5F0C,0x4E10,0x4E15,0x4E2A,0x4E31,0x4E36,0x4E3C,0x4E3F,
0x4E42,0x4E56,0x4E58,0x4E82,0x4E85,0x8C6B,0x4E8A,0x8212,
0x5F0D,0x4E8E,0x4E9E,0x4E9F,0x4EA0,0x4EA2,0x4EB0,0x4EB3,
@@ -863,7 +863,7 @@ static uint16 tab_jisx0208_uni40[]={
0x5078,0x5080,0x509A,0x5085,0x50B4,0x50B2};
/* page 41 0x5121-0x517E */
-static uint16 tab_jisx0208_uni41[]={
+static const uint16 tab_jisx0208_uni41[]={
0x50C9,0x50CA,0x50B3,0x50C2,0x50D6,0x50DE,0x50E5,0x50ED,
0x50E3,0x50EE,0x50F9,0x50F5,0x5109,0x5101,0x5102,0x5116,
0x5115,0x5114,0x511A,0x5121,0x513A,0x5137,0x513C,0x513B,
@@ -878,7 +878,7 @@ static uint16 tab_jisx0208_uni41[]={
0x5294,0x5292,0x5271,0x5288,0x5291,0x8FA8};
/* page 42 0x5221-0x527E */
-static uint16 tab_jisx0208_uni42[]={
+static const uint16 tab_jisx0208_uni42[]={
0x8FA7,0x52AC,0x52AD,0x52BC,0x52B5,0x52C1,0x52CD,0x52D7,
0x52DE,0x52E3,0x52E6,0x98ED,0x52E0,0x52F3,0x52F5,0x52F8,
0x52F9,0x5306,0x5308,0x7538,0x530D,0x5310,0x530F,0x5315,
@@ -893,7 +893,7 @@ static uint16 tab_jisx0208_uni42[]={
0x54B8,0x54A5,0x54AC,0x54C4,0x54C8,0x54A8};
/* page 43 0x5321-0x537E */
-static uint16 tab_jisx0208_uni43[]={
+static const uint16 tab_jisx0208_uni43[]={
0x54AB,0x54C2,0x54A4,0x54BE,0x54BC,0x54D8,0x54E5,0x54E6,
0x550F,0x5514,0x54FD,0x54EE,0x54ED,0x54FA,0x54E2,0x5539,
0x5540,0x5563,0x554C,0x552E,0x555C,0x5545,0x5556,0x5557,
@@ -908,7 +908,7 @@ static uint16 tab_jisx0208_uni43[]={
0x56EE,0x56F9,0x5700,0x56FF,0x5704,0x5709};
/* page 44 0x5421-0x547E */
-static uint16 tab_jisx0208_uni44[]={
+static const uint16 tab_jisx0208_uni44[]={
0x5708,0x570B,0x570D,0x5713,0x5718,0x5716,0x55C7,0x571C,
0x5726,0x5737,0x5738,0x574E,0x573B,0x5740,0x574F,0x5769,
0x57C0,0x5788,0x5761,0x577F,0x5789,0x5793,0x57A0,0x57B3,
@@ -923,7 +923,7 @@ static uint16 tab_jisx0208_uni44[]={
0x5958,0x5962,0x5960,0x5967,0x596C,0x5969};
/* page 45 0x5521-0x557E */
-static uint16 tab_jisx0208_uni45[]={
+static const uint16 tab_jisx0208_uni45[]={
0x5978,0x5981,0x599D,0x4F5E,0x4FAB,0x59A3,0x59B2,0x59C6,
0x59E8,0x59DC,0x598D,0x59D9,0x59DA,0x5A25,0x5A1F,0x5A11,
0x5A1C,0x5A09,0x5A1A,0x5A40,0x5A6C,0x5A49,0x5A35,0x5A36,
@@ -938,7 +938,7 @@ static uint16 tab_jisx0208_uni45[]={
0x5C38,0x5C39,0x5C41,0x5C46,0x5C4E,0x5C53};
/* page 46 0x5621-0x567E */
-static uint16 tab_jisx0208_uni46[]={
+static const uint16 tab_jisx0208_uni46[]={
0x5C50,0x5C4F,0x5B71,0x5C6C,0x5C6E,0x4E62,0x5C76,0x5C79,
0x5C8C,0x5C91,0x5C94,0x599B,0x5CAB,0x5CBB,0x5CB6,0x5CBC,
0x5CB7,0x5CC5,0x5CBE,0x5CC7,0x5CD9,0x5CE9,0x5CFD,0x5CFA,
@@ -953,7 +953,7 @@ static uint16 tab_jisx0208_uni46[]={
0x5EA0,0x5EC1,0x5EC2,0x5EC8,0x5ED0,0x5ECF};
/* page 47 0x5721-0x577E */
-static uint16 tab_jisx0208_uni47[]={
+static const uint16 tab_jisx0208_uni47[]={
0x5ED6,0x5EE3,0x5EDD,0x5EDA,0x5EDB,0x5EE2,0x5EE1,0x5EE8,
0x5EE9,0x5EEC,0x5EF1,0x5EF3,0x5EF0,0x5EF4,0x5EF8,0x5EFE,
0x5F03,0x5F09,0x5F5D,0x5F5C,0x5F0B,0x5F11,0x5F16,0x5F29,
@@ -968,7 +968,7 @@ static uint16 tab_jisx0208_uni47[]={
0x6059,0x6081,0x608D,0x60E7,0x6083,0x609A};
/* page 48 0x5821-0x587E */
-static uint16 tab_jisx0208_uni48[]={
+static const uint16 tab_jisx0208_uni48[]={
0x6084,0x609B,0x6096,0x6097,0x6092,0x60A7,0x608B,0x60E1,
0x60B8,0x60E0,0x60D3,0x60B4,0x5FF0,0x60BD,0x60C6,0x60B5,
0x60D8,0x614D,0x6115,0x6106,0x60F6,0x60F7,0x6100,0x60F4,
@@ -983,7 +983,7 @@ static uint16 tab_jisx0208_uni48[]={
0x6208,0x6209,0x620D,0x620C,0x6214,0x621B};
/* page 49 0x5921-0x597E */
-static uint16 tab_jisx0208_uni49[]={
+static const uint16 tab_jisx0208_uni49[]={
0x621E,0x6221,0x622A,0x622E,0x6230,0x6232,0x6233,0x6241,
0x624E,0x625E,0x6263,0x625B,0x6260,0x6268,0x627C,0x6282,
0x6289,0x627E,0x6292,0x6293,0x6296,0x62D4,0x6283,0x6294,
@@ -998,7 +998,7 @@ static uint16 tab_jisx0208_uni49[]={
0x6495,0x6493,0x64A5,0x64A9,0x6488,0x64BC};
/* page 50 0x5A21-0x5A7E */
-static uint16 tab_jisx0208_uni50[]={
+static const uint16 tab_jisx0208_uni50[]={
0x64DA,0x64D2,0x64C5,0x64C7,0x64BB,0x64D8,0x64C2,0x64F1,
0x64E7,0x8209,0x64E0,0x64E1,0x62AC,0x64E3,0x64EF,0x652C,
0x64F6,0x64F4,0x64F2,0x64FA,0x6500,0x64FD,0x6518,0x651C,
@@ -1013,7 +1013,7 @@ static uint16 tab_jisx0208_uni50[]={
0x669D,0x66C1,0x66B9,0x66C9,0x66BE,0x66BC};
/* page 51 0x5B21-0x5B7E */
-static uint16 tab_jisx0208_uni51[]={
+static const uint16 tab_jisx0208_uni51[]={
0x66C4,0x66B8,0x66D6,0x66DA,0x66E0,0x663F,0x66E6,0x66E9,
0x66F0,0x66F5,0x66F7,0x670F,0x6716,0x671E,0x6726,0x6727,
0x9738,0x672E,0x673F,0x6736,0x6741,0x6738,0x6737,0x6746,
@@ -1028,7 +1028,7 @@ static uint16 tab_jisx0208_uni51[]={
0x68D8,0x6922,0x6926,0x68E1,0x690C,0x68CD};
/* page 52 0x5C21-0x5C7E */
-static uint16 tab_jisx0208_uni52[]={
+static const uint16 tab_jisx0208_uni52[]={
0x68D4,0x68E7,0x68D5,0x6936,0x6912,0x6904,0x68D7,0x68E3,
0x6925,0x68F9,0x68E0,0x68EF,0x6928,0x692A,0x691A,0x6923,
0x6921,0x68C6,0x6979,0x6977,0x695C,0x6978,0x696B,0x6954,
@@ -1043,7 +1043,7 @@ static uint16 tab_jisx0208_uni52[]={
0x6A90,0x6A8D,0x6AA0,0x6A84,0x6AA2,0x6AA3};
/* page 53 0x5D21-0x5D7E */
-static uint16 tab_jisx0208_uni53[]={
+static const uint16 tab_jisx0208_uni53[]={
0x6A97,0x8617,0x6ABB,0x6AC3,0x6AC2,0x6AB8,0x6AB3,0x6AAC,
0x6ADE,0x6AD1,0x6ADF,0x6AAA,0x6ADA,0x6AEA,0x6AFB,0x6B05,
0x8616,0x6AFA,0x6B12,0x6B16,0x9B31,0x6B1F,0x6B38,0x6B37,
@@ -1058,7 +1058,7 @@ static uint16 tab_jisx0208_uni53[]={
0x6CD7,0x6CC5,0x6CDD,0x6CAE,0x6CB1,0x6CBE};
/* page 54 0x5E21-0x5E7E */
-static uint16 tab_jisx0208_uni54[]={
+static const uint16 tab_jisx0208_uni54[]={
0x6CBA,0x6CDB,0x6CEF,0x6CD9,0x6CEA,0x6D1F,0x884D,0x6D36,
0x6D2B,0x6D3D,0x6D38,0x6D19,0x6D35,0x6D33,0x6D12,0x6D0C,
0x6D63,0x6D93,0x6D64,0x6D5A,0x6D79,0x6D59,0x6D8E,0x6D95,
@@ -1073,7 +1073,7 @@ static uint16 tab_jisx0208_uni54[]={
0x6F3F,0x6EF2,0x6F31,0x6EEF,0x6F32,0x6ECC};
/* page 55 0x5F21-0x5F7E */
-static uint16 tab_jisx0208_uni55[]={
+static const uint16 tab_jisx0208_uni55[]={
0x6F3E,0x6F13,0x6EF7,0x6F86,0x6F7A,0x6F78,0x6F81,0x6F80,
0x6F6F,0x6F5B,0x6FF3,0x6F6D,0x6F82,0x6F7C,0x6F58,0x6F8E,
0x6F91,0x6FC2,0x6F66,0x6FB3,0x6FA3,0x6FA1,0x6FA4,0x6FB9,
@@ -1088,7 +1088,7 @@ static uint16 tab_jisx0208_uni55[]={
0x71CE,0x71E0,0x71EC,0x71E7,0x71F5,0x71FC};
/* page 56 0x6021-0x607E */
-static uint16 tab_jisx0208_uni56[]={
+static const uint16 tab_jisx0208_uni56[]={
0x71F9,0x71FF,0x720D,0x7210,0x721B,0x7228,0x722D,0x722C,
0x7230,0x7232,0x723B,0x723C,0x723F,0x7240,0x7246,0x724B,
0x7258,0x7274,0x727E,0x7282,0x7281,0x7287,0x7292,0x7296,
@@ -1103,7 +1103,7 @@ static uint16 tab_jisx0208_uni56[]={
0x749E,0x74A7,0x74CA,0x74CF,0x74D4,0x73F1};
/* page 57 0x6121-0x617E */
-static uint16 tab_jisx0208_uni57[]={
+static const uint16 tab_jisx0208_uni57[]={
0x74E0,0x74E3,0x74E7,0x74E9,0x74EE,0x74F2,0x74F0,0x74F1,
0x74F8,0x74F7,0x7504,0x7503,0x7505,0x750C,0x750E,0x750D,
0x7515,0x7513,0x751E,0x7526,0x752C,0x753C,0x7544,0x754D,
@@ -1118,7 +1118,7 @@ static uint16 tab_jisx0208_uni57[]={
0x7668,0x7669,0x766A,0x7667,0x766C,0x7670};
/* page 58 0x6221-0x627E */
-static uint16 tab_jisx0208_uni58[]={
+static const uint16 tab_jisx0208_uni58[]={
0x7672,0x7676,0x7678,0x767C,0x7680,0x7683,0x7688,0x768B,
0x768E,0x7696,0x7693,0x7699,0x769A,0x76B0,0x76B4,0x76B8,
0x76B9,0x76BA,0x76C2,0x76CD,0x76D6,0x76D2,0x76DE,0x76E1,
@@ -1133,7 +1133,7 @@ static uint16 tab_jisx0208_uni58[]={
0x78D4,0x78BE,0x78BC,0x78C5,0x78CA,0x78EC};
/* page 59 0x6321-0x637E */
-static uint16 tab_jisx0208_uni59[]={
+static const uint16 tab_jisx0208_uni59[]={
0x78E7,0x78DA,0x78FD,0x78F4,0x7907,0x7912,0x7911,0x7919,
0x792C,0x792B,0x7940,0x7960,0x7957,0x795F,0x795A,0x7955,
0x7953,0x797A,0x797F,0x798A,0x799D,0x79A7,0x9F4B,0x79AA,
@@ -1148,7 +1148,7 @@ static uint16 tab_jisx0208_uni59[]={
0x7B19,0x7B1E,0x7B35,0x7B28,0x7B36,0x7B50};
/* page 60 0x6421-0x647E */
-static uint16 tab_jisx0208_uni60[]={
+static const uint16 tab_jisx0208_uni60[]={
0x7B7A,0x7B04,0x7B4D,0x7B0B,0x7B4C,0x7B45,0x7B75,0x7B65,
0x7B74,0x7B67,0x7B70,0x7B71,0x7B6C,0x7B6E,0x7B9D,0x7B98,
0x7B9F,0x7B8D,0x7B9C,0x7B9A,0x7B8B,0x7B92,0x7B8F,0x7B5D,
@@ -1163,7 +1163,7 @@ static uint16 tab_jisx0208_uni60[]={
0x7CEF,0x7CF2,0x7CF4,0x7CF6,0x7CFA,0x7D06};
/* page 61 0x6521-0x657E */
-static uint16 tab_jisx0208_uni61[]={
+static const uint16 tab_jisx0208_uni61[]={
0x7D02,0x7D1C,0x7D15,0x7D0A,0x7D45,0x7D4B,0x7D2E,0x7D32,
0x7D3F,0x7D35,0x7D46,0x7D73,0x7D56,0x7D4E,0x7D72,0x7D68,
0x7D6E,0x7D4F,0x7D63,0x7D93,0x7D89,0x7D5B,0x7D8F,0x7D7D,
@@ -1178,7 +1178,7 @@ static uint16 tab_jisx0208_uni61[]={
0x7E96,0x7E8E,0x7E9B,0x7E9C,0x7F38,0x7F3A};
/* page 62 0x6621-0x667E */
-static uint16 tab_jisx0208_uni62[]={
+static const uint16 tab_jisx0208_uni62[]={
0x7F45,0x7F4C,0x7F4D,0x7F4E,0x7F50,0x7F51,0x7F55,0x7F54,
0x7F58,0x7F5F,0x7F60,0x7F68,0x7F69,0x7F67,0x7F78,0x7F82,
0x7F86,0x7F83,0x7F88,0x7F87,0x7F8C,0x7F94,0x7F9E,0x7F9D,
@@ -1193,7 +1193,7 @@ static uint16 tab_jisx0208_uni62[]={
0x80F1,0x811B,0x8129,0x8123,0x812F,0x814B};
/* page 63 0x6721-0x677E */
-static uint16 tab_jisx0208_uni63[]={
+static const uint16 tab_jisx0208_uni63[]={
0x968B,0x8146,0x813E,0x8153,0x8151,0x80FC,0x8171,0x816E,
0x8165,0x8166,0x8174,0x8183,0x8188,0x818A,0x8180,0x8182,
0x81A0,0x8195,0x81A4,0x81A3,0x815F,0x8193,0x81A9,0x81B0,
@@ -1208,7 +1208,7 @@ static uint16 tab_jisx0208_uni63[]={
0x82F9,0x82DE,0x8306,0x82DC,0x8309,0x82D9};
/* page 64 0x6821-0x687E */
-static uint16 tab_jisx0208_uni64[]={
+static const uint16 tab_jisx0208_uni64[]={
0x8335,0x8334,0x8316,0x8332,0x8331,0x8340,0x8339,0x8350,
0x8345,0x832F,0x832B,0x8317,0x8318,0x8385,0x839A,0x83AA,
0x839F,0x83A2,0x8396,0x8323,0x838E,0x8387,0x838A,0x837C,
@@ -1223,7 +1223,7 @@ static uint16 tab_jisx0208_uni64[]={
0x8514,0x84FC,0x8540,0x8563,0x8558,0x8548};
/* page 65 0x6921-0x697E */
-static uint16 tab_jisx0208_uni65[]={
+static const uint16 tab_jisx0208_uni65[]={
0x8541,0x8602,0x854B,0x8555,0x8580,0x85A4,0x8588,0x8591,
0x858A,0x85A8,0x856D,0x8594,0x859B,0x85EA,0x8587,0x859C,
0x8577,0x857E,0x8590,0x85C9,0x85BA,0x85CF,0x85B9,0x85D0,
@@ -1238,7 +1238,7 @@ static uint16 tab_jisx0208_uni65[]={
0x874E,0x8774,0x8757,0x8768,0x876E,0x8759};
/* page 66 0x6A21-0x6A7E */
-static uint16 tab_jisx0208_uni66[]={
+static const uint16 tab_jisx0208_uni66[]={
0x8753,0x8763,0x876A,0x8805,0x87A2,0x879F,0x8782,0x87AF,
0x87CB,0x87BD,0x87C0,0x87D0,0x96D6,0x87AB,0x87C4,0x87B3,
0x87C7,0x87C6,0x87BB,0x87EF,0x87F2,0x87E0,0x880F,0x880D,
@@ -1253,7 +1253,7 @@ static uint16 tab_jisx0208_uni66[]={
0x8936,0x8938,0x894C,0x891D,0x8960,0x895E};
/* page 67 0x6B21-0x6B7E */
-static uint16 tab_jisx0208_uni67[]={
+static const uint16 tab_jisx0208_uni67[]={
0x8966,0x8964,0x896D,0x896A,0x896F,0x8974,0x8977,0x897E,
0x8983,0x8988,0x898A,0x8993,0x8998,0x89A1,0x89A9,0x89A6,
0x89AC,0x89AF,0x89B2,0x89BA,0x89BD,0x89BF,0x89C0,0x89DA,
@@ -1268,7 +1268,7 @@ static uint16 tab_jisx0208_uni67[]={
0x8B4E,0x8B49,0x8B56,0x8B5B,0x8B5A,0x8B6B};
/* page 68 0x6C21-0x6C7E */
-static uint16 tab_jisx0208_uni68[]={
+static const uint16 tab_jisx0208_uni68[]={
0x8B5F,0x8B6C,0x8B6F,0x8B74,0x8B7D,0x8B80,0x8B8C,0x8B8E,
0x8B92,0x8B93,0x8B96,0x8B99,0x8B9A,0x8C3A,0x8C41,0x8C3F,
0x8C48,0x8C4C,0x8C4E,0x8C50,0x8C55,0x8C62,0x8C6C,0x8C78,
@@ -1283,7 +1283,7 @@ static uint16 tab_jisx0208_uni68[]={
0x8E1F,0x8E42,0x8E35,0x8E30,0x8E34,0x8E4A};
/* page 69 0x6D21-0x6D7E */
-static uint16 tab_jisx0208_uni69[]={
+static const uint16 tab_jisx0208_uni69[]={
0x8E47,0x8E49,0x8E4C,0x8E50,0x8E48,0x8E59,0x8E64,0x8E60,
0x8E2A,0x8E63,0x8E55,0x8E76,0x8E72,0x8E7C,0x8E81,0x8E87,
0x8E85,0x8E84,0x8E8B,0x8E8A,0x8E93,0x8E91,0x8E94,0x8E99,
@@ -1298,7 +1298,7 @@ static uint16 tab_jisx0208_uni69[]={
0x900B,0x9027,0x9036,0x9035,0x9039,0x8FF8};
/* page 70 0x6E21-0x6E7E */
-static uint16 tab_jisx0208_uni70[]={
+static const uint16 tab_jisx0208_uni70[]={
0x904F,0x9050,0x9051,0x9052,0x900E,0x9049,0x903E,0x9056,
0x9058,0x905E,0x9068,0x906F,0x9076,0x96A8,0x9072,0x9082,
0x907D,0x9081,0x9080,0x908A,0x9089,0x908F,0x90A8,0x90AF,
@@ -1313,7 +1313,7 @@ static uint16 tab_jisx0208_uni70[]={
0x92B7,0x92E9,0x930F,0x92FA,0x9344,0x932E};
/* page 71 0x6F21-0x6F7E */
-static uint16 tab_jisx0208_uni71[]={
+static const uint16 tab_jisx0208_uni71[]={
0x9319,0x9322,0x931A,0x9323,0x933A,0x9335,0x933B,0x935C,
0x9360,0x937C,0x936E,0x9356,0x93B0,0x93AC,0x93AD,0x9394,
0x93B9,0x93D6,0x93D7,0x93E8,0x93E5,0x93D8,0x93C3,0x93DD,
@@ -1328,7 +1328,7 @@ static uint16 tab_jisx0208_uni71[]={
0x964C,0x964F,0x964B,0x9677,0x965C,0x965E};
/* page 72 0x7021-0x707E */
-static uint16 tab_jisx0208_uni72[]={
+static const uint16 tab_jisx0208_uni72[]={
0x965D,0x965F,0x9666,0x9672,0x966C,0x968D,0x9698,0x9695,
0x9697,0x96AA,0x96A7,0x96B1,0x96B2,0x96B0,0x96B4,0x96B6,
0x96B8,0x96B9,0x96CE,0x96CB,0x96C9,0x96CD,0x894D,0x96DC,
@@ -1343,7 +1343,7 @@ static uint16 tab_jisx0208_uni72[]={
0x9846,0x984F,0x984B,0x986B,0x986F,0x9870};
/* page 73 0x7121-0x717E */
-static uint16 tab_jisx0208_uni73[]={
+static const uint16 tab_jisx0208_uni73[]={
0x9871,0x9874,0x9873,0x98AA,0x98AF,0x98B1,0x98B6,0x98C4,
0x98C3,0x98C6,0x98E9,0x98EB,0x9903,0x9909,0x9912,0x9914,
0x9918,0x9921,0x991D,0x991E,0x9924,0x9920,0x992C,0x992E,
@@ -1358,7 +1358,7 @@ static uint16 tab_jisx0208_uni73[]={
0x9AEF,0x9AEB,0x9AEE,0x9AF4,0x9AF1,0x9AF7};
/* page 74 0x7221-0x727E */
-static uint16 tab_jisx0208_uni74[]={
+static const uint16 tab_jisx0208_uni74[]={
0x9AFB,0x9B06,0x9B18,0x9B1A,0x9B1F,0x9B22,0x9B23,0x9B25,
0x9B27,0x9B28,0x9B29,0x9B2A,0x9B2E,0x9B2F,0x9B32,0x9B44,
0x9B43,0x9B4F,0x9B4D,0x9B4E,0x9B51,0x9B58,0x9B74,0x9B93,
@@ -1373,7 +1373,7 @@ static uint16 tab_jisx0208_uni74[]={
0x9D12,0x9D41,0x9D3F,0x9D3E,0x9D46,0x9D48};
/* page 75 0x7321-0x737E */
-static uint16 tab_jisx0208_uni75[]={
+static const uint16 tab_jisx0208_uni75[]={
0x9D5D,0x9D5E,0x9D64,0x9D51,0x9D50,0x9D59,0x9D72,0x9D89,
0x9D87,0x9DAB,0x9D6F,0x9D7A,0x9D9A,0x9DA4,0x9DA9,0x9DB2,
0x9DC4,0x9DC1,0x9DBB,0x9DB8,0x9DBA,0x9DC6,0x9DCF,0x9DC2,
@@ -1388,7 +1388,7 @@ static uint16 tab_jisx0208_uni75[]={
0x9F77,0x9F72,0x9F76,0x9F95,0x9F9C,0x9FA0};
/* page 76 0x7421-0x7426 */
-static uint16 tab_jisx0208_uni76[]={
+static const uint16 tab_jisx0208_uni76[]={
0x582F,0x69C7,0x9059,0x7464,0x51DC,0x7199};
static int
@@ -1552,25 +1552,25 @@ my_jisx0208_uni_onechar(int code){
/* page 0 0x005C-0x005C */
-static uint16 tab_uni_jisx02080[]={
+static const uint16 tab_uni_jisx02080[]={
0x2140};
/* page 1 0x00A2-0x00B6 */
-static uint16 tab_uni_jisx02081[]={
+static const uint16 tab_uni_jisx02081[]={
0x2171,0x2172, 0, 0, 0,0x2178,0x212F, 0,
0, 0,0x224C, 0, 0, 0,0x216B,0x215E,
0, 0,0x212D, 0,0x2279};
/* page 2 0x00D7-0x00D7 */
-static uint16 tab_uni_jisx02082[]={
+static const uint16 tab_uni_jisx02082[]={
0x215F};
/* page 3 0x00F7-0x00F7 */
-static uint16 tab_uni_jisx02083[]={
+static const uint16 tab_uni_jisx02083[]={
0x2160};
/* page 4 0x0391-0x03C9 */
-static uint16 tab_uni_jisx02084[]={
+static const uint16 tab_uni_jisx02084[]={
0x2621,0x2622,0x2623,0x2624,0x2625,0x2626,0x2627,0x2628,
0x2629,0x262A,0x262B,0x262C,0x262D,0x262E,0x262F,0x2630,
0x2631, 0,0x2632,0x2633,0x2634,0x2635,0x2636,0x2637,
@@ -1581,7 +1581,7 @@ static uint16 tab_uni_jisx02084[]={
0x2658};
/* page 5 0x0401-0x0451 */
-static uint16 tab_uni_jisx02085[]={
+static const uint16 tab_uni_jisx02085[]={
0x2727, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,0x2721,
0x2722,0x2723,0x2724,0x2725,0x2726,0x2728,0x2729,0x272A,
@@ -1595,7 +1595,7 @@ static uint16 tab_uni_jisx02085[]={
0x2757};
/* page 6 0x2010-0x203B */
-static uint16 tab_uni_jisx02086[]={
+static const uint16 tab_uni_jisx02086[]={
0x213E, 0, 0, 0, 0,0x213D,0x2142, 0,
0x2146,0x2147, 0, 0,0x2148,0x2149, 0, 0,
0x2277,0x2278, 0, 0, 0,0x2145,0x2144, 0,
@@ -1604,23 +1604,23 @@ static uint16 tab_uni_jisx02086[]={
0, 0, 0,0x2228};
/* page 7 0x2103-0x2103 */
-static uint16 tab_uni_jisx02087[]={
+static const uint16 tab_uni_jisx02087[]={
0x216E};
/* page 8 0x212B-0x212B */
-static uint16 tab_uni_jisx02088[]={
+static const uint16 tab_uni_jisx02088[]={
0x2272};
/* page 9 0x2190-0x2193 */
-static uint16 tab_uni_jisx02089[]={
+static const uint16 tab_uni_jisx02089[]={
0x222B,0x222C,0x222A,0x222D};
/* page 10 0x21D2-0x21D4 */
-static uint16 tab_uni_jisx020810[]={
+static const uint16 tab_uni_jisx020810[]={
0x224D, 0,0x224E};
/* page 11 0x2200-0x223D */
-static uint16 tab_uni_jisx020811[]={
+static const uint16 tab_uni_jisx020811[]={
0x224F, 0,0x225F,0x2250, 0, 0, 0,0x2260,
0x223A, 0, 0,0x223B, 0, 0, 0, 0,
0, 0,0x215D, 0, 0, 0, 0, 0,
@@ -1631,26 +1631,26 @@ static uint16 tab_uni_jisx020811[]={
0, 0, 0, 0, 0,0x2266};
/* page 12 0x2252-0x226B */
-static uint16 tab_uni_jisx020812[]={
+static const uint16 tab_uni_jisx020812[]={
0x2262, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x2162,0x2261,
0, 0, 0, 0,0x2165,0x2166, 0, 0,
0x2263,0x2264};
/* page 13 0x2282-0x2287 */
-static uint16 tab_uni_jisx020813[]={
+static const uint16 tab_uni_jisx020813[]={
0x223E,0x223F, 0, 0,0x223C,0x223D};
/* page 14 0x22A5-0x22A5 */
-static uint16 tab_uni_jisx020814[]={
+static const uint16 tab_uni_jisx020814[]={
0x225D};
/* page 15 0x2312-0x2312 */
-static uint16 tab_uni_jisx020815[]={
+static const uint16 tab_uni_jisx020815[]={
0x225E};
/* page 16 0x2500-0x254B */
-static uint16 tab_uni_jisx020816[]={
+static const uint16 tab_uni_jisx020816[]={
0x2821,0x282C,0x2822,0x282D, 0, 0, 0, 0,
0, 0, 0, 0,0x2823, 0, 0,0x282E,
0x2824, 0, 0,0x282F,0x2826, 0, 0,0x2831,
@@ -1663,7 +1663,7 @@ static uint16 tab_uni_jisx020816[]={
0, 0, 0,0x2836};
/* page 17 0x25A0-0x25CF */
-static uint16 tab_uni_jisx020817[]={
+static const uint16 tab_uni_jisx020817[]={
0x2223,0x2222, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0,0x2225,0x2224, 0, 0, 0, 0,
@@ -1673,30 +1673,30 @@ static uint16 tab_uni_jisx020817[]={
};
/* page 18 0x25EF-0x25EF */
-static uint16 tab_uni_jisx020818[]={
+static const uint16 tab_uni_jisx020818[]={
0x227E};
/* page 19 0x2605-0x2606 */
-static uint16 tab_uni_jisx020819[]={
+static const uint16 tab_uni_jisx020819[]={
0x217A,0x2179};
/* page 20 0x2640-0x2642 */
-static uint16 tab_uni_jisx020820[]={
+static const uint16 tab_uni_jisx020820[]={
0x216A, 0,0x2169};
/* page 21 0x266A-0x266F */
-static uint16 tab_uni_jisx020821[]={
+static const uint16 tab_uni_jisx020821[]={
0x2276, 0, 0,0x2275, 0,0x2274};
/* page 22 0x3000-0x301C */
-static uint16 tab_uni_jisx020822[]={
+static const uint16 tab_uni_jisx020822[]={
0x2121,0x2122,0x2123,0x2137, 0,0x2139,0x213A,0x213B,
0x2152,0x2153,0x2154,0x2155,0x2156,0x2157,0x2158,0x2159,
0x215A,0x215B,0x2229,0x222E,0x214C,0x214D, 0, 0,
0, 0, 0, 0,0x2141};
/* page 23 0x3041-0x30FE */
-static uint16 tab_uni_jisx020823[]={
+static const uint16 tab_uni_jisx020823[]={
0x2421,0x2422,0x2423,0x2424,0x2425,0x2426,0x2427,0x2428,
0x2429,0x242A,0x242B,0x242C,0x242D,0x242E,0x242F,0x2430,
0x2431,0x2432,0x2433,0x2434,0x2435,0x2436,0x2437,0x2438,
@@ -1723,7 +1723,7 @@ static uint16 tab_uni_jisx020823[]={
0, 0,0x2126,0x213C,0x2133,0x2134};
/* page 24 0x4E00-0x5516 */
-static uint16 tab_uni_jisx020824[]={
+static const uint16 tab_uni_jisx020824[]={
0x306C,0x437A, 0,0x3C37, 0, 0, 0,0x4B7C,
0x3E66,0x3B30,0x3E65,0x323C, 0,0x4954,0x4D3F, 0,
0x5022,0x312F, 0, 0,0x336E,0x5023,0x4024,0x5242,
@@ -1953,7 +1953,7 @@ static uint16 tab_uni_jisx020824[]={
0x4562, 0, 0, 0,0x532A, 0,0x3022};
/* page 25 0x552E-0x5563 */
-static uint16 tab_uni_jisx020825[]={
+static const uint16 tab_uni_jisx020825[]={
0x5334,0x4D23, 0,0x3E27, 0,0x533A, 0, 0,
0, 0,0x5339,0x5330, 0, 0, 0, 0,
0x4243, 0,0x5331, 0, 0, 0,0x426F,0x5336,
@@ -1963,7 +1963,7 @@ static uint16 tab_uni_jisx020825[]={
0, 0, 0, 0, 0,0x5332};
/* page 26 0x557B-0x576A */
-static uint16 tab_uni_jisx020826[]={
+static const uint16 tab_uni_jisx020826[]={
0x5341,0x5346, 0,0x5342, 0,0x533D, 0, 0,
0x5347,0x4131, 0, 0,0x5349, 0,0x3922,0x533F,
0x437D, 0, 0, 0, 0, 0, 0, 0,
@@ -2029,7 +2029,7 @@ static uint16 tab_uni_jisx020826[]={
};
/* page 27 0x577F-0x5A9B */
-static uint16 tab_uni_jisx020827[]={
+static const uint16 tab_uni_jisx020827[]={
0x5434, 0, 0,0x3F62, 0, 0, 0, 0,
0,0x5432,0x5435, 0,0x373F, 0, 0, 0,
0, 0, 0, 0,0x5436, 0, 0, 0,
@@ -2132,7 +2132,7 @@ static uint16 tab_uni_jisx020827[]={
0, 0, 0,0x553B,0x4932};
/* page 28 0x5ABC-0x5D29 */
-static uint16 tab_uni_jisx020828[]={
+static const uint16 tab_uni_jisx020828[]={
0x553C,0x5540,0x553D, 0, 0,0x3247,0x553F, 0,
0, 0, 0, 0, 0,0x3C3B, 0,0x553E,
0x3779, 0, 0, 0,0x554C, 0, 0, 0,
@@ -2213,7 +2213,7 @@ static uint16 tab_uni_jisx020828[]={
0, 0, 0, 0, 0,0x4A78};
/* page 29 0x5D4B-0x6BF3 */
-static uint16 tab_uni_jisx020829[]={
+static const uint16 tab_uni_jisx020829[]={
0x564B,0x5648, 0,0x564A, 0,0x4D72, 0,0x5649,
0, 0, 0, 0, 0, 0, 0, 0,
0,0x563F, 0, 0, 0, 0, 0, 0,
@@ -2686,7 +2686,7 @@ static uint16 tab_uni_jisx020829[]={
0x5D5E};
/* page 30 0x6C08-0x6CF3 */
-static uint16 tab_uni_jisx020830[]={
+static const uint16 tab_uni_jisx020830[]={
0x5D61, 0, 0, 0, 0, 0, 0,0x3B61,
0,0x4C31, 0,0x5D62,0x5D63, 0, 0,0x3524,
0, 0, 0,0x5D64, 0, 0, 0, 0,
@@ -2719,7 +2719,7 @@ static uint16 tab_uni_jisx020830[]={
0x4259,0x5D76, 0,0x314B};
/* page 31 0x6D0B-0x7409 */
-static uint16 tab_uni_jisx020831[]={
+static const uint16 tab_uni_jisx020831[]={
0x4D4E,0x5E30, 0, 0, 0, 0, 0,0x5E2F,
0, 0, 0, 0,0x4076, 0,0x5E2C, 0,
0x4D6C, 0, 0,0x4636,0x5E26, 0, 0, 0,
@@ -2946,7 +2946,7 @@ static uint16 tab_uni_jisx020831[]={
0x3565, 0,0x6066,0x4D7D, 0, 0,0x4E30};
/* page 32 0x7422-0x7845 */
-static uint16 tab_uni_jisx020832[]={
+static const uint16 tab_uni_jisx020832[]={
0x4276, 0, 0,0x6068, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0x606A,0x4E56,0x3657,0x487C,0x474A, 0, 0, 0,
@@ -3082,7 +3082,7 @@ static uint16 tab_uni_jisx020832[]={
0, 0, 0,0x626B};
/* page 33 0x785D-0x7E9C */
-static uint16 tab_uni_jisx020833[]={
+static const uint16 tab_uni_jisx020833[]={
0x3E4B, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x4E32,0x3945,
0, 0,0x3827, 0, 0,0x4823, 0,0x626D,
@@ -3286,7 +3286,7 @@ static uint16 tab_uni_jisx020833[]={
};
/* page 34 0x7F36-0x8358 */
-static uint16 tab_uni_jisx020834[]={
+static const uint16 tab_uni_jisx020834[]={
0x344C, 0,0x657D, 0,0x657E, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,0x6621,
0, 0, 0, 0, 0, 0,0x6622,0x6623,
@@ -3422,7 +3422,7 @@ static uint16 tab_uni_jisx020834[]={
0, 0,0x4171};
/* page 35 0x8373-0x8B9A */
-static uint16 tab_uni_jisx020835[]={
+static const uint16 tab_uni_jisx020835[]={
0x683A, 0,0x683B, 0,0x3259, 0, 0, 0,
0x322E,0x6838, 0, 0, 0, 0, 0, 0,
0, 0,0x682E, 0,0x6836, 0,0x683D,0x6837,
@@ -3687,7 +3687,7 @@ static uint16 tab_uni_jisx020835[]={
};
/* page 36 0x8C37-0x8D16 */
-static uint16 tab_uni_jisx020836[]={
+static const uint16 tab_uni_jisx020836[]={
0x432B, 0, 0,0x6C2E, 0, 0, 0, 0,
0x6C30, 0,0x6C2F, 0, 0, 0, 0,0x4626,
0,0x6C31, 0,0x4B2D, 0,0x6C32, 0,0x6C33,
@@ -3719,7 +3719,7 @@ static uint16 tab_uni_jisx020836[]={
};
/* page 37 0x8D64-0x8F64 */
-static uint16 tab_uni_jisx020837[]={
+static const uint16 tab_uni_jisx020837[]={
0x4056, 0,0x3C4F,0x6C5F, 0, 0, 0,0x3352,
0,0x6C60, 0, 0,0x4176,0x6C61, 0,0x6C62,
0x496B, 0, 0,0x352F, 0, 0, 0, 0,
@@ -3787,7 +3787,7 @@ static uint16 tab_uni_jisx020837[]={
0x6D62};
/* page 38 0x8F9B-0x9132 */
-static uint16 tab_uni_jisx020838[]={
+static const uint16 tab_uni_jisx020838[]={
0x3F49,0x6D63, 0,0x3C2D,0x6D64, 0, 0, 0,
0x6D65, 0, 0, 0,0x5221,0x517E, 0, 0,
0, 0,0x6D66,0x6570,0x6D67,0x4324,0x3F2B,0x4740,
@@ -3842,7 +3842,7 @@ static uint16 tab_uni_jisx020838[]={
};
/* page 39 0x9149-0x92B9 */
-static uint16 tab_uni_jisx020839[]={
+static const uint16 tab_uni_jisx020839[]={
0x4653,0x6E44,0x3D36,0x3C60,0x475B,0x4371, 0, 0,
0,0x3C72, 0,0x3F6C, 0,0x6E45, 0,0x6E46,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -3892,7 +3892,7 @@ static uint16 tab_uni_jisx020839[]={
0x6E78};
/* page 40 0x92CF-0x93E8 */
-static uint16 tab_uni_jisx020840[]={
+static const uint16 tab_uni_jisx020840[]={
0x6E77, 0, 0,0x4B2F, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,0x3D7B, 0, 0,
@@ -3931,7 +3931,7 @@ static uint16 tab_uni_jisx020840[]={
0,0x6F34};
/* page 41 0x9403-0x9481 */
-static uint16 tab_uni_jisx020841[]={
+static const uint16 tab_uni_jisx020841[]={
0x6F3F, 0, 0, 0,0x6F40, 0, 0, 0,
0, 0, 0, 0, 0,0x6F41, 0, 0,
0x6F3E,0x6F3D, 0, 0, 0,0x3E62,0x462A,0x6F3C,
@@ -3950,7 +3950,7 @@ static uint16 tab_uni_jisx020841[]={
0,0x6F55,0x6F53,0x6F56,0x6F58, 0,0x6F57};
/* page 42 0x9577-0x95E5 */
-static uint16 tab_uni_jisx020842[]={
+static const uint16 tab_uni_jisx020842[]={
0x4439, 0, 0, 0, 0, 0, 0, 0,
0,0x4C67, 0,0x6F59,0x412E, 0, 0, 0,
0x6F5A, 0,0x4A44,0x6F5B,0x332B, 0, 0, 0,
@@ -3967,7 +3967,7 @@ static uint16 tab_uni_jisx020842[]={
0, 0,0x6F71,0x6F73, 0, 0,0x6F72};
/* page 43 0x961C-0x9874 */
-static uint16 tab_uni_jisx020843[]={
+static const uint16 tab_uni_jisx020843[]={
0x496C, 0, 0, 0, 0,0x6F74, 0, 0,
0, 0, 0, 0,0x6F75, 0,0x3A65, 0,
0, 0,0x6F76,0x6F77, 0, 0,0x4B49, 0,
@@ -4046,14 +4046,14 @@ static uint16 tab_uni_jisx020843[]={
0x7122};
/* page 44 0x98A8-0x98C6 */
-static uint16 tab_uni_jisx020844[]={
+static const uint16 tab_uni_jisx020844[]={
0x4977, 0,0x7124, 0, 0, 0, 0,0x7125,
0,0x7126, 0, 0, 0, 0,0x7127, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,0x7129,0x7128, 0,0x712A};
/* page 45 0x98DB-0x9957 */
-static uint16 tab_uni_jisx020845[]={
+static const uint16 tab_uni_jisx020845[]={
0x4874,0x664C, 0, 0,0x3F29, 0, 0,0x3532,
0, 0, 0, 0, 0, 0,0x712B, 0,
0x712C, 0,0x522C,0x5D3B,0x4853, 0, 0,0x307B,
@@ -4072,7 +4072,7 @@ static uint16 tab_uni_jisx020845[]={
0, 0,0x7143, 0,0x3642};
/* page 46 0x9996-0x9A6B */
-static uint16 tab_uni_jisx020846[]={
+static const uint16 tab_uni_jisx020846[]={
0x3C73,0x7144,0x7145,0x3961, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,0x7146,
0, 0,0x333E, 0, 0, 0,0x474F,0x7147,
@@ -4102,7 +4102,7 @@ static uint16 tab_uni_jisx020846[]={
0, 0, 0,0x7169,0x716B,0x716A};
/* page 47 0x9AA8-0x9B5A */
-static uint16 tab_uni_jisx020847[]={
+static const uint16 tab_uni_jisx020847[]={
0x397C, 0, 0, 0, 0,0x716C, 0, 0,
0x716D, 0, 0, 0, 0, 0, 0, 0,
0x333C, 0, 0, 0,0x716E, 0, 0, 0,
@@ -4128,7 +4128,7 @@ static uint16 tab_uni_jisx020847[]={
0x7236, 0,0x357B};
/* page 48 0x9B6F-0x9C78 */
-static uint16 tab_uni_jisx020848[]={
+static const uint16 tab_uni_jisx020848[]={
0x4F25, 0, 0, 0, 0,0x7237, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0x7239, 0, 0, 0,
@@ -4165,7 +4165,7 @@ static uint16 tab_uni_jisx020848[]={
0,0x7269};
/* page 49 0x9CE5-0x9DFD */
-static uint16 tab_uni_jisx020849[]={
+static const uint16 tab_uni_jisx020849[]={
0x443B, 0,0x726A, 0,0x4837, 0,0x726F,0x726B,
0, 0, 0,0x726C, 0, 0,0x4B31,0x4C44,
0,0x4650, 0, 0, 0, 0, 0, 0,
@@ -4204,11 +4204,11 @@ static uint16 tab_uni_jisx020849[]={
0x733F};
/* page 50 0x9E1A-0x9E1E */
-static uint16 tab_uni_jisx020850[]={
+static const uint16 tab_uni_jisx020850[]={
0x7340,0x7341, 0, 0,0x7342};
/* page 51 0x9E75-0x9F77 */
-static uint16 tab_uni_jisx020851[]={
+static const uint16 tab_uni_jisx020851[]={
0x7343, 0, 0,0x3834,0x7344, 0, 0, 0,
0x7345, 0,0x3C2F, 0,0x7346, 0, 0, 0,
0, 0, 0,0x7347, 0, 0,0x7348,0x7349,
@@ -4244,13 +4244,13 @@ static uint16 tab_uni_jisx020851[]={
0,0x737B,0x7379};
/* page 52 0x9F8D-0x9FA0 */
-static uint16 tab_uni_jisx020852[]={
+static const uint16 tab_uni_jisx020852[]={
0x4E36, 0, 0, 0, 0, 0, 0, 0,
0x737C, 0, 0, 0, 0, 0, 0,0x737D,
0x6354, 0, 0,0x737E};
/* page 53 0xFF01-0xFF5D */
-static uint16 tab_uni_jisx020853[]={
+static const uint16 tab_uni_jisx020853[]={
0x212A, 0,0x2174,0x2170,0x2173,0x2175, 0,0x214A,
0x214B,0x2176,0x215C,0x2124, 0,0x2125,0x213F,0x2330,
0x2331,0x2332,0x2333,0x2334,0x2335,0x2336,0x2337,0x2338,
@@ -4265,7 +4265,7 @@ static uint16 tab_uni_jisx020853[]={
0x2379,0x237A,0x2150,0x2143,0x2151};
/* page 54 0xFFE3-0xFFE5 */
-static uint16 tab_uni_jisx020854[]={
+static const uint16 tab_uni_jisx020854[]={
0x2131, 0,0x216F};
static int
@@ -4386,11 +4386,11 @@ my_uni_jisx0208_onechar(int code){
/* page 0 0x007E-0x007E */
-static uint16 tab_uni_jisx02120[]={
+static const uint16 tab_uni_jisx02120[]={
0x2237};
/* page 1 0x00A1-0x017E */
-static uint16 tab_uni_jisx02121[]={
+static const uint16 tab_uni_jisx02121[]={
0x2242, 0, 0,0x2270, 0,0x2243, 0, 0,
0x226D,0x226C, 0, 0, 0,0x226E,0x2234, 0,
0, 0, 0, 0, 0, 0, 0,0x2231,
@@ -4421,28 +4421,28 @@ static uint16 tab_uni_jisx02121[]={
0x2A75,0x2B75,0x2A77,0x2B77,0x2A76,0x2B76};
/* page 2 0x01CD-0x01DC */
-static uint16 tab_uni_jisx02122[]={
+static const uint16 tab_uni_jisx02122[]={
0x2A26,0x2B26,0x2A43,0x2B43,0x2A55,0x2B55,0x2A67,0x2B67,
0x2A70,0x2B70,0x2A6D,0x2B6D,0x2A6F,0x2B6F,0x2A6E,0x2B6E
};
/* page 3 0x01F5-0x01F5 */
-static uint16 tab_uni_jisx02123[]={
+static const uint16 tab_uni_jisx02123[]={
0x2B39};
/* page 4 0x02C7-0x02DD */
-static uint16 tab_uni_jisx02124[]={
+static const uint16 tab_uni_jisx02124[]={
0x2230, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0,0x222F,0x2232,0x2236,0x2235, 0,0x2233};
/* page 5 0x0384-0x0390 */
-static uint16 tab_uni_jisx02125[]={
+static const uint16 tab_uni_jisx02125[]={
0x2238,0x2239,0x2661, 0,0x2662,0x2663,0x2664, 0,
0x2667, 0,0x2669,0x266C,0x2676};
/* page 6 0x03AA-0x03CE */
-static uint16 tab_uni_jisx02126[]={
+static const uint16 tab_uni_jisx02126[]={
0x2665,0x266A,0x2671,0x2672,0x2673,0x2674,0x267B, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -4450,22 +4450,22 @@ static uint16 tab_uni_jisx02126[]={
0x2675,0x267A,0x2677,0x2679,0x267C};
/* page 7 0x0402-0x040F */
-static uint16 tab_uni_jisx02127[]={
+static const uint16 tab_uni_jisx02127[]={
0x2742,0x2743,0x2744,0x2745,0x2746,0x2747,0x2748,0x2749,
0x274A,0x274B,0x274C, 0,0x274D,0x274E};
/* page 8 0x0452-0x045F */
-static uint16 tab_uni_jisx02128[]={
+static const uint16 tab_uni_jisx02128[]={
0x2772,0x2773,0x2774,0x2775,0x2776,0x2777,0x2778,0x2779,
0x277A,0x277B,0x277C, 0,0x277D,0x277E};
/* page 9 0x2116-0x2122 */
-static uint16 tab_uni_jisx02129[]={
+static const uint16 tab_uni_jisx02129[]={
0x2271, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0x226F};
/* page 10 0x4E02-0x4F19 */
-static uint16 tab_uni_jisx021210[]={
+static const uint16 tab_uni_jisx021210[]={
0x3021, 0,0x3022,0x3023, 0, 0, 0, 0,
0, 0,0x3024, 0, 0, 0, 0, 0,
0x3025, 0, 0, 0, 0, 0, 0, 0,
@@ -4504,7 +4504,7 @@ static uint16 tab_uni_jisx021210[]={
};
/* page 11 0x4F2E-0x5166 */
-static uint16 tab_uni_jisx021211[]={
+static const uint16 tab_uni_jisx021211[]={
0x305D, 0, 0,0x305E, 0,0x3060, 0,0x3061,
0,0x3062, 0,0x3063, 0,0x3064, 0, 0,
0x3065, 0,0x3066, 0,0x3067, 0, 0, 0,
@@ -4579,7 +4579,7 @@ static uint16 tab_uni_jisx021211[]={
0x326E};
/* page 12 0x517E-0x5515 */
-static uint16 tab_uni_jisx021212[]={
+static const uint16 tab_uni_jisx021212[]={
0x326F, 0, 0, 0, 0,0x3270,0x3271, 0,
0, 0, 0, 0, 0,0x3272, 0, 0,
0x3273, 0, 0, 0, 0, 0, 0, 0,
@@ -4698,7 +4698,7 @@ static uint16 tab_uni_jisx021212[]={
};
/* page 13 0x552A-0x5566 */
-static uint16 tab_uni_jisx021213[]={
+static const uint16 tab_uni_jisx021213[]={
0x354E,0x354F, 0, 0, 0, 0, 0, 0,
0x3550, 0, 0,0x3551,0x3552, 0, 0, 0,
0,0x3553,0x3554,0x3555, 0, 0, 0,0x3556,
@@ -4709,7 +4709,7 @@ static uint16 tab_uni_jisx021213[]={
0, 0,0x3563, 0,0x3564};
/* page 14 0x557F-0x5C36 */
-static uint16 tab_uni_jisx021214[]={
+static const uint16 tab_uni_jisx021214[]={
0x3565, 0,0x3566,0x3567, 0, 0, 0,0x3568,
0,0x3569, 0, 0, 0, 0, 0,0x356A,
0x356B, 0,0x356C,0x356D,0x356E,0x356F, 0, 0,
@@ -4928,7 +4928,7 @@ static uint16 tab_uni_jisx021214[]={
};
/* page 15 0x5C59-0x5EEB */
-static uint16 tab_uni_jisx021215[]={
+static const uint16 tab_uni_jisx021215[]={
0x3A77,0x3A78, 0,0x3A79, 0, 0, 0, 0,
0,0x3A7A,0x3A7B, 0, 0, 0,0x3A7C,0x3A7D,
0x3A7E, 0, 0, 0,0x3B21, 0, 0,0x3B22,
@@ -5014,7 +5014,7 @@ static uint16 tab_uni_jisx021215[]={
0, 0,0x3C5B};
/* page 16 0x5F02-0x6149 */
-static uint16 tab_uni_jisx021216[]={
+static const uint16 tab_uni_jisx021216[]={
0x3C5C, 0, 0, 0,0x3C5D,0x3C5E,0x3C5F, 0,
0, 0, 0, 0,0x3C60, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,0x3C61,
@@ -5091,7 +5091,7 @@ static uint16 tab_uni_jisx021216[]={
};
/* page 17 0x615E-0x6290 */
-static uint16 tab_uni_jisx021217[]={
+static const uint16 tab_uni_jisx021217[]={
0x3E53, 0,0x3E54, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x3E55, 0,
0, 0, 0, 0,0x3E56, 0, 0, 0,
@@ -5133,7 +5133,7 @@ static uint16 tab_uni_jisx021217[]={
0x3F46,0x3F47,0x3F48};
/* page 18 0x62A6-0x679B */
-static uint16 tab_uni_jisx021218[]={
+static const uint16 tab_uni_jisx021218[]={
0x3F49, 0,0x3F4A, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,0x3F4B, 0, 0,
0x3F4C,0x3F4D, 0, 0,0x3F4E, 0, 0, 0,
@@ -5295,7 +5295,7 @@ static uint16 tab_uni_jisx021218[]={
0x432D, 0,0x432E,0x432F, 0,0x4330};
/* page 19 0x67B0-0x67F9 */
-static uint16 tab_uni_jisx021219[]={
+static const uint16 tab_uni_jisx021219[]={
0x4331,0x4332,0x4333, 0, 0,0x4334, 0, 0,
0, 0, 0,0x4335,0x4336,0x4337, 0, 0,
0x4339, 0,0x433A,0x433B, 0,0x433C, 0, 0,
@@ -5308,7 +5308,7 @@ static uint16 tab_uni_jisx021219[]={
0,0x4338};
/* page 20 0x6814-0x6917 */
-static uint16 tab_uni_jisx021220[]={
+static const uint16 tab_uni_jisx021220[]={
0x434A, 0, 0, 0, 0,0x434B, 0, 0,
0,0x434C, 0,0x434D, 0, 0, 0, 0,
0, 0, 0,0x434F,0x434E, 0, 0, 0,
@@ -5344,7 +5344,7 @@ static uint16 tab_uni_jisx021220[]={
0, 0,0x443B,0x443C};
/* page 21 0x6931-0x6D3F */
-static uint16 tab_uni_jisx021221[]={
+static const uint16 tab_uni_jisx021221[]={
0x443D, 0,0x443E, 0,0x443F, 0, 0,0x4440,
0, 0,0x4441, 0, 0, 0, 0, 0,
0,0x4442, 0, 0,0x4443, 0, 0, 0,
@@ -5477,7 +5477,7 @@ static uint16 tab_uni_jisx021221[]={
0x473A, 0, 0,0x473B, 0, 0,0x473C};
/* page 22 0x6D57-0x6E04 */
-static uint16 tab_uni_jisx021222[]={
+static const uint16 tab_uni_jisx021222[]={
0x473D, 0, 0, 0, 0, 0, 0,0x473E,
0x473F, 0,0x4740, 0, 0, 0,0x4741, 0,
0x4742, 0, 0, 0, 0, 0, 0, 0,
@@ -5502,7 +5502,7 @@ static uint16 tab_uni_jisx021222[]={
0,0x4767, 0, 0, 0,0x4768};
/* page 23 0x6E1E-0x6ECF */
-static uint16 tab_uni_jisx021223[]={
+static const uint16 tab_uni_jisx021223[]={
0x4769, 0, 0, 0,0x476A, 0, 0, 0,
0,0x476B, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0x476C, 0, 0, 0,
@@ -5528,7 +5528,7 @@ static uint16 tab_uni_jisx021223[]={
0x4839,0x483A};
/* page 24 0x6EEB-0x70E4 */
-static uint16 tab_uni_jisx021224[]={
+static const uint16 tab_uni_jisx021224[]={
0x483B, 0,0x483C,0x483D, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x483E, 0,
0x483F, 0,0x4840, 0, 0, 0, 0, 0,
@@ -5595,7 +5595,7 @@ static uint16 tab_uni_jisx021224[]={
0,0x4960};
/* page 25 0x70FA-0x71DC */
-static uint16 tab_uni_jisx021225[]={
+static const uint16 tab_uni_jisx021225[]={
0x4961, 0, 0, 0, 0, 0, 0, 0,
0,0x4962,0x4963,0x4964,0x4965,0x4966, 0, 0,
0,0x4967,0x4968, 0, 0,0x4969, 0, 0,
@@ -5627,7 +5627,7 @@ static uint16 tab_uni_jisx021225[]={
0x4A3A, 0,0x4A3B};
/* page 26 0x71F8-0x7E9E */
-static uint16 tab_uni_jisx021226[]={
+static const uint16 tab_uni_jisx021226[]={
0x4A3C, 0, 0, 0, 0, 0,0x4A3D, 0,
0x4A3E, 0, 0, 0, 0, 0, 0,0x4A3F,
0x4A40,0x4A41, 0, 0, 0, 0, 0, 0,
@@ -6035,7 +6035,7 @@ static uint16 tab_uni_jisx021226[]={
0x5467, 0,0x5468, 0, 0,0x5469,0x546A};
/* page 27 0x7F3B-0x8044 */
-static uint16 tab_uni_jisx021227[]={
+static const uint16 tab_uni_jisx021227[]={
0x546C,0x546B,0x546D,0x546E,0x546F, 0, 0, 0,
0x5470,0x5471, 0, 0,0x5472, 0, 0, 0,
0, 0, 0, 0,0x5473, 0, 0,0x5474,
@@ -6072,7 +6072,7 @@ static uint16 tab_uni_jisx021227[]={
0,0x5563};
/* page 28 0x8060-0x8357 */
-static uint16 tab_uni_jisx021228[]={
+static const uint16 tab_uni_jisx021228[]={
0x5564, 0, 0, 0,0x5565, 0,0x5566, 0,
0, 0, 0, 0, 0,0x5567, 0, 0,
0,0x5568, 0, 0, 0,0x5569, 0, 0,
@@ -6171,7 +6171,7 @@ static uint16 tab_uni_jisx021228[]={
};
/* page 29 0x8370-0x8419 */
-static uint16 tab_uni_jisx021229[]={
+static const uint16 tab_uni_jisx021229[]={
0x577D, 0, 0, 0, 0, 0, 0, 0,
0x577E, 0, 0, 0, 0,0x5821, 0,0x5822,
0x5823, 0,0x5824, 0,0x5825, 0,0x5826, 0,
@@ -6196,7 +6196,7 @@ static uint16 tab_uni_jisx021229[]={
0,0x584B};
/* page 30 0x842F-0x8880 */
-static uint16 tab_uni_jisx021230[]={
+static const uint16 tab_uni_jisx021230[]={
0x584D, 0, 0, 0, 0, 0, 0, 0,
0, 0,0x584E, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,0x584F, 0,
@@ -6338,7 +6338,7 @@ static uint16 tab_uni_jisx021230[]={
0,0x5C38};
/* page 31 0x8898-0x89BC */
-static uint16 tab_uni_jisx021231[]={
+static const uint16 tab_uni_jisx021231[]={
0x5C39, 0,0x5C3A,0x5C3B,0x5C3C, 0, 0,0x5C3D,
0x5C3E, 0, 0, 0, 0, 0, 0, 0,
0x5C3F, 0,0x5C40, 0, 0, 0, 0, 0,
@@ -6378,7 +6378,7 @@ static uint16 tab_uni_jisx021231[]={
0, 0, 0, 0,0x5D33};
/* page 32 0x89D4-0x8B9F */
-static uint16 tab_uni_jisx021232[]={
+static const uint16 tab_uni_jisx021232[]={
0x5D34,0x5D35,0x5D36,0x5D37,0x5D38, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0,0x5D39, 0, 0, 0,0x5D3A, 0,0x5D3B,
@@ -6439,7 +6439,7 @@ static uint16 tab_uni_jisx021232[]={
0x5E5F, 0,0x5E60,0x5E61};
/* page 33 0x8C38-0x8CA4 */
-static uint16 tab_uni_jisx021233[]={
+static const uint16 tab_uni_jisx021233[]={
0x5E62,0x5E63, 0, 0, 0,0x5E64,0x5E65, 0,
0, 0, 0, 0, 0,0x5E66, 0,0x5E67,
0,0x5E68, 0,0x5E69, 0, 0, 0,0x5E6A,
@@ -6456,7 +6456,7 @@ static uint16 tab_uni_jisx021233[]={
0, 0, 0, 0,0x5F29};
/* page 34 0x8CB9-0x8D1B */
-static uint16 tab_uni_jisx021234[]={
+static const uint16 tab_uni_jisx021234[]={
0x5F2A,0x5F2B, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0x5F2C,0x5F2D, 0, 0,
0x5F2E, 0,0x5F2F, 0, 0, 0,0x5F30, 0,
@@ -6472,7 +6472,7 @@ static uint16 tab_uni_jisx021234[]={
0, 0,0x5F45};
/* page 35 0x8D65-0x8F65 */
-static uint16 tab_uni_jisx021235[]={
+static const uint16 tab_uni_jisx021235[]={
0x5F46, 0, 0, 0,0x5F47, 0, 0,0x5F48,
0,0x5F49, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -6540,7 +6540,7 @@ static uint16 tab_uni_jisx021235[]={
0x612C};
/* page 36 0x8F9D-0x9484 */
-static uint16 tab_uni_jisx021236[]={
+static const uint16 tab_uni_jisx021236[]={
0x612D, 0, 0,0x612E,0x612F, 0, 0,0x6130,
0x6131,0x6132, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -6701,7 +6701,7 @@ static uint16 tab_uni_jisx021236[]={
};
/* page 37 0x9578-0x95E6 */
-static uint16 tab_uni_jisx021237[]={
+static const uint16 tab_uni_jisx021237[]={
0x657D,0x657E, 0, 0, 0, 0,0x6621, 0,
0, 0, 0, 0,0x6622, 0, 0, 0,
0x6623, 0, 0, 0,0x6624,0x6625,0x6626, 0,
@@ -6718,7 +6718,7 @@ static uint16 tab_uni_jisx021237[]={
0x6641, 0, 0, 0,0x6642, 0,0x6643};
/* page 38 0x961D-0x986C */
-static uint16 tab_uni_jisx021238[]={
+static const uint16 tab_uni_jisx021238[]={
0x6644,0x6645, 0, 0, 0,0x6646, 0,0x6647,
0x6648,0x6649, 0, 0, 0, 0, 0,0x664A,
0, 0, 0, 0,0x664B, 0,0x664C, 0,
@@ -6796,7 +6796,7 @@ static uint16 tab_uni_jisx021238[]={
};
/* page 39 0x98AB-0x98CC */
-static uint16 tab_uni_jisx021239[]={
+static const uint16 tab_uni_jisx021239[]={
0x683A, 0,0x683B,0x683C, 0,0x683D, 0, 0,
0,0x683E, 0, 0,0x683F,0x6840, 0,0x6841,
0x6842, 0, 0, 0,0x6843, 0, 0,0x6844,
@@ -6804,7 +6804,7 @@ static uint16 tab_uni_jisx021239[]={
0,0x6847};
/* page 40 0x98E1-0x9960 */
-static uint16 tab_uni_jisx021240[]={
+static const uint16 tab_uni_jisx021240[]={
0x6848, 0,0x6849, 0,0x684A,0x684B,0x684C, 0,
0,0x684D, 0, 0, 0, 0, 0, 0,
0, 0,0x684E, 0, 0,0x684F, 0, 0,
@@ -6824,7 +6824,7 @@ static uint16 tab_uni_jisx021240[]={
};
/* page 41 0x999B-0x9A5D */
-static uint16 tab_uni_jisx021241[]={
+static const uint16 tab_uni_jisx021241[]={
0x6877, 0,0x6878, 0,0x6879, 0, 0, 0,
0, 0, 0,0x687A, 0, 0, 0, 0,
0, 0, 0, 0, 0,0x687B,0x687C,0x687D,
@@ -6852,7 +6852,7 @@ static uint16 tab_uni_jisx021241[]={
0, 0,0x6955};
/* page 42 0x9AAA-0x9C7B */
-static uint16 tab_uni_jisx021242[]={
+static const uint16 tab_uni_jisx021242[]={
0x6956, 0,0x6957, 0,0x6958,0x6959, 0, 0,
0x695A, 0,0x695B,0x695C,0x695D, 0, 0,0x695E,
0,0x695F, 0, 0,0x6960,0x6961, 0,0x6962,
@@ -6914,7 +6914,7 @@ static uint16 tab_uni_jisx021242[]={
0,0x6B58};
/* page 43 0x9CE6-0x9E1D */
-static uint16 tab_uni_jisx021243[]={
+static const uint16 tab_uni_jisx021243[]={
0x6B59, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0x6B5A, 0, 0, 0,
0,0x6B5B, 0,0x6B5C, 0, 0, 0, 0,
@@ -6957,7 +6957,7 @@ static uint16 tab_uni_jisx021243[]={
};
/* page 44 0x9E7A-0x9FA5 */
-static uint16 tab_uni_jisx021244[]={
+static const uint16 tab_uni_jisx021244[]={
0x6C59,0x6C5A,0x6C5B, 0, 0, 0,0x6C5C, 0,
0x6C5D,0x6C5E,0x6C5F,0x6C60, 0,0x6C61, 0, 0,
0, 0, 0, 0,0x6C62,0x6C63, 0, 0,
@@ -7094,34 +7094,34 @@ my_uni_jisx0212_onechar(int code){
/* page 0 0x222F-0x2244 */
-static uint16 tab_jisx0212_uni0[]={
+static const uint16 tab_jisx0212_uni0[]={
0x02D8,0x02C7,0x00B8,0x02D9,0x02DD,0x00AF,0x02DB,0x02DA,
0x007E,0x0384,0x0385, 0, 0, 0, 0, 0,
0, 0, 0,0x00A1,0x00A6,0x00BF};
/* page 1 0x226B-0x2271 */
-static uint16 tab_jisx0212_uni1[]={
+static const uint16 tab_jisx0212_uni1[]={
0x00BA,0x00AA,0x00A9,0x00AE,0x2122,0x00A4,0x2116};
/* page 2 0x2661-0x267C */
-static uint16 tab_jisx0212_uni2[]={
+static const uint16 tab_jisx0212_uni2[]={
0x0386,0x0388,0x0389,0x038A,0x03AA, 0,0x038C, 0,
0x038E,0x03AB, 0,0x038F, 0, 0, 0, 0,
0x03AC,0x03AD,0x03AE,0x03AF,0x03CA,0x0390,0x03CC,0x03C2,
0x03CD,0x03CB,0x03B0,0x03CE};
/* page 3 0x2742-0x274E */
-static uint16 tab_jisx0212_uni3[]={
+static const uint16 tab_jisx0212_uni3[]={
0x0402,0x0403,0x0404,0x0405,0x0406,0x0407,0x0408,0x0409,
0x040A,0x040B,0x040C,0x040E,0x040F};
/* page 4 0x2772-0x277E */
-static uint16 tab_jisx0212_uni4[]={
+static const uint16 tab_jisx0212_uni4[]={
0x0452,0x0453,0x0454,0x0455,0x0456,0x0457,0x0458,0x0459,
0x045A,0x045B,0x045C,0x045E,0x045F};
/* page 5 0x2921-0x2950 */
-static uint16 tab_jisx0212_uni5[]={
+static const uint16 tab_jisx0212_uni5[]={
0x00C6,0x0110, 0,0x0126, 0,0x0132, 0,0x0141,
0x013F, 0,0x014A,0x00D8,0x0152, 0,0x0166,0x00DE,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -7131,7 +7131,7 @@ static uint16 tab_jisx0212_uni5[]={
};
/* page 6 0x2A21-0x2A77 */
-static uint16 tab_jisx0212_uni6[]={
+static const uint16 tab_jisx0212_uni6[]={
0x00C1,0x00C0,0x00C4,0x00C2,0x0102,0x01CD,0x0100,0x0104,
0x00C5,0x00C3,0x0106,0x0108,0x010C,0x00C7,0x010A,0x010E,
0x00C9,0x00C8,0x00CB,0x00CA,0x011A,0x0116,0x0112,0x0118,
@@ -7145,7 +7145,7 @@ static uint16 tab_jisx0212_uni6[]={
0x0174,0x00DD,0x0178,0x0176,0x0179,0x017D,0x017B};
/* page 7 0x2B21-0x2B77 */
-static uint16 tab_jisx0212_uni7[]={
+static const uint16 tab_jisx0212_uni7[]={
0x00E1,0x00E0,0x00E4,0x00E2,0x0103,0x01CE,0x0101,0x0105,
0x00E5,0x00E3,0x0107,0x0109,0x010D,0x00E7,0x010B,0x010F,
0x00E9,0x00E8,0x00EB,0x00EA,0x011B,0x0117,0x0113,0x0119,
@@ -7159,7 +7159,7 @@ static uint16 tab_jisx0212_uni7[]={
0x0175,0x00FD,0x00FF,0x0177,0x017A,0x017E,0x017C};
/* page 8 0x3021-0x307E */
-static uint16 tab_jisx0212_uni8[]={
+static const uint16 tab_jisx0212_uni8[]={
0x4E02,0x4E04,0x4E05,0x4E0C,0x4E12,0x4E1F,0x4E23,0x4E24,
0x4E28,0x4E2B,0x4E2E,0x4E2F,0x4E30,0x4E35,0x4E40,0x4E41,
0x4E44,0x4E47,0x4E51,0x4E5A,0x4E5C,0x4E63,0x4E68,0x4E69,
@@ -7174,7 +7174,7 @@ static uint16 tab_jisx0212_uni8[]={
0x4F7A,0x4F7D,0x4F7E,0x4F81,0x4F82,0x4F84};
/* page 9 0x3121-0x317E */
-static uint16 tab_jisx0212_uni9[]={
+static const uint16 tab_jisx0212_uni9[]={
0x4F85,0x4F89,0x4F8A,0x4F8C,0x4F8E,0x4F90,0x4F92,0x4F93,
0x4F94,0x4F97,0x4F99,0x4F9A,0x4F9E,0x4F9F,0x4FB2,0x4FB7,
0x4FB9,0x4FBB,0x4FBC,0x4FBD,0x4FBE,0x4FC0,0x4FC1,0x4FC5,
@@ -7189,7 +7189,7 @@ static uint16 tab_jisx0212_uni9[]={
0x5084,0x5086,0x508A,0x508E,0x508F,0x5090};
/* page 10 0x3221-0x327E */
-static uint16 tab_jisx0212_uni10[]={
+static const uint16 tab_jisx0212_uni10[]={
0x5092,0x5093,0x5094,0x5096,0x509B,0x509C,0x509E,0x509F,
0x50A0,0x50A1,0x50A2,0x50AA,0x50AF,0x50B0,0x50B9,0x50BA,
0x50BD,0x50C0,0x50C3,0x50C4,0x50C7,0x50CC,0x50CE,0x50D0,
@@ -7204,7 +7204,7 @@ static uint16 tab_jisx0212_uni10[]={
0x51B8,0x51BA,0x51BC,0x51BE,0x51BF,0x51C2};
/* page 11 0x3321-0x337E */
-static uint16 tab_jisx0212_uni11[]={
+static const uint16 tab_jisx0212_uni11[]={
0x51C8,0x51CF,0x51D1,0x51D2,0x51D3,0x51D5,0x51D8,0x51DE,
0x51E2,0x51E5,0x51EE,0x51F2,0x51F3,0x51F4,0x51F7,0x5201,
0x5202,0x5205,0x5212,0x5213,0x5215,0x5216,0x5218,0x5222,
@@ -7219,7 +7219,7 @@ static uint16 tab_jisx0212_uni11[]={
0x52F6,0x52F7,0x5300,0x5303,0x530A,0x530B};
/* page 12 0x3421-0x347E */
-static uint16 tab_jisx0212_uni12[]={
+static const uint16 tab_jisx0212_uni12[]={
0x530C,0x5311,0x5313,0x5318,0x531B,0x531C,0x531E,0x531F,
0x5325,0x5327,0x5328,0x5329,0x532B,0x532C,0x532D,0x5330,
0x5332,0x5335,0x533C,0x533D,0x533E,0x5342,0x534C,0x534B,
@@ -7234,7 +7234,7 @@ static uint16 tab_jisx0212_uni12[]={
0x5469,0x546B,0x546D,0x546E,0x5474,0x547F};
/* page 13 0x3521-0x357E */
-static uint16 tab_jisx0212_uni13[]={
+static const uint16 tab_jisx0212_uni13[]={
0x5481,0x5483,0x5485,0x5488,0x5489,0x548D,0x5491,0x5495,
0x5496,0x549C,0x549F,0x54A1,0x54A6,0x54A7,0x54A9,0x54AA,
0x54AD,0x54AE,0x54B1,0x54B7,0x54B9,0x54BA,0x54BB,0x54BF,
@@ -7249,7 +7249,7 @@ static uint16 tab_jisx0212_uni13[]={
0x55C9,0x55CB,0x55CC,0x55CE,0x55D1,0x55D2};
/* page 14 0x3621-0x367E */
-static uint16 tab_jisx0212_uni14[]={
+static const uint16 tab_jisx0212_uni14[]={
0x55D3,0x55D7,0x55D8,0x55DB,0x55DE,0x55E2,0x55E9,0x55F6,
0x55FF,0x5605,0x5608,0x560A,0x560D,0x560E,0x560F,0x5610,
0x5611,0x5612,0x5619,0x562C,0x5630,0x5633,0x5635,0x5637,
@@ -7264,7 +7264,7 @@ static uint16 tab_jisx0212_uni14[]={
0x56E6,0x56E7,0x56E8,0x56F1,0x56EB,0x56ED};
/* page 15 0x3721-0x377E */
-static uint16 tab_jisx0212_uni15[]={
+static const uint16 tab_jisx0212_uni15[]={
0x56F6,0x56F7,0x5701,0x5702,0x5707,0x570A,0x570C,0x5711,
0x5715,0x571A,0x571B,0x571D,0x5720,0x5722,0x5723,0x5724,
0x5725,0x5729,0x572A,0x572C,0x572E,0x572F,0x5733,0x5734,
@@ -7279,7 +7279,7 @@ static uint16 tab_jisx0212_uni15[]={
0x57FF,0x5803,0x5804,0x5808,0x5809,0x57E1};
/* page 16 0x3821-0x387E */
-static uint16 tab_jisx0212_uni16[]={
+static const uint16 tab_jisx0212_uni16[]={
0x580C,0x580D,0x581B,0x581E,0x581F,0x5820,0x5826,0x5827,
0x582D,0x5832,0x5839,0x583F,0x5849,0x584C,0x584D,0x584F,
0x5850,0x5855,0x585F,0x5861,0x5864,0x5867,0x5868,0x5878,
@@ -7294,7 +7294,7 @@ static uint16 tab_jisx0212_uni16[]={
0x595E,0x595F,0x5961,0x5963,0x596B,0x596D};
/* page 17 0x3921-0x397E */
-static uint16 tab_jisx0212_uni17[]={
+static const uint16 tab_jisx0212_uni17[]={
0x596F,0x5972,0x5975,0x5976,0x5979,0x597B,0x597C,0x598B,
0x598C,0x598E,0x5992,0x5995,0x5997,0x599F,0x59A4,0x59A7,
0x59AD,0x59AE,0x59AF,0x59B0,0x59B3,0x59B7,0x59BA,0x59BC,
@@ -7309,7 +7309,7 @@ static uint16 tab_jisx0212_uni17[]={
0x5AB3,0x5AB5,0x5AB8,0x5ABA,0x5ABB,0x5ABF};
/* page 18 0x3A21-0x3A7E */
-static uint16 tab_jisx0212_uni18[]={
+static const uint16 tab_jisx0212_uni18[]={
0x5AC4,0x5AC6,0x5AC8,0x5ACF,0x5ADA,0x5ADC,0x5AE0,0x5AE5,
0x5AEA,0x5AEE,0x5AF5,0x5AF6,0x5AFD,0x5B00,0x5B01,0x5B08,
0x5B17,0x5B34,0x5B19,0x5B1B,0x5B1D,0x5B21,0x5B25,0x5B2D,
@@ -7324,7 +7324,7 @@ static uint16 tab_jisx0212_uni18[]={
0x5C5C,0x5C62,0x5C63,0x5C67,0x5C68,0x5C69};
/* page 19 0x3B21-0x3B7E */
-static uint16 tab_jisx0212_uni19[]={
+static const uint16 tab_jisx0212_uni19[]={
0x5C6D,0x5C70,0x5C74,0x5C75,0x5C7A,0x5C7B,0x5C7C,0x5C7D,
0x5C87,0x5C88,0x5C8A,0x5C8F,0x5C92,0x5C9D,0x5C9F,0x5CA0,
0x5CA2,0x5CA3,0x5CA6,0x5CAA,0x5CB2,0x5CB4,0x5CB5,0x5CBA,
@@ -7339,7 +7339,7 @@ static uint16 tab_jisx0212_uni19[]={
0x5DD0,0x5DCE,0x5DD8,0x5DD9,0x5DE0,0x5DE4};
/* page 20 0x3C21-0x3C7E */
-static uint16 tab_jisx0212_uni20[]={
+static const uint16 tab_jisx0212_uni20[]={
0x5DE9,0x5DF8,0x5DF9,0x5E00,0x5E07,0x5E0D,0x5E12,0x5E14,
0x5E15,0x5E18,0x5E1F,0x5E20,0x5E2E,0x5E28,0x5E32,0x5E35,
0x5E3E,0x5E4B,0x5E50,0x5E49,0x5E51,0x5E56,0x5E58,0x5E5B,
@@ -7354,7 +7354,7 @@ static uint16 tab_jisx0212_uni20[]={
0x5F58,0x5F5B,0x5F60,0x5F63,0x5F64,0x5F67};
/* page 21 0x3D21-0x3D7E */
-static uint16 tab_jisx0212_uni21[]={
+static const uint16 tab_jisx0212_uni21[]={
0x5F6F,0x5F72,0x5F74,0x5F75,0x5F78,0x5F7A,0x5F7D,0x5F7E,
0x5F89,0x5F8D,0x5F8F,0x5F96,0x5F9C,0x5F9D,0x5FA2,0x5FA7,
0x5FAB,0x5FA4,0x5FAC,0x5FAF,0x5FB0,0x5FB1,0x5FB8,0x5FC4,
@@ -7369,7 +7369,7 @@ static uint16 tab_jisx0212_uni21[]={
0x60A4,0x60A5,0x60A8,0x60B0,0x60B1,0x60B7};
/* page 22 0x3E21-0x3E7E */
-static uint16 tab_jisx0212_uni22[]={
+static const uint16 tab_jisx0212_uni22[]={
0x60BB,0x60BE,0x60C2,0x60C4,0x60C8,0x60C9,0x60CA,0x60CB,
0x60CE,0x60CF,0x60D4,0x60D5,0x60D9,0x60DB,0x60DD,0x60DE,
0x60E2,0x60E5,0x60F2,0x60F5,0x60F8,0x60FC,0x60FD,0x6102,
@@ -7384,7 +7384,7 @@ static uint16 tab_jisx0212_uni22[]={
0x61DF,0x61E1,0x61E2,0x61E7,0x61E9,0x61E5};
/* page 23 0x3F21-0x3F7E */
-static uint16 tab_jisx0212_uni23[]={
+static const uint16 tab_jisx0212_uni23[]={
0x61EC,0x61ED,0x61EF,0x6201,0x6203,0x6204,0x6207,0x6213,
0x6215,0x621C,0x6220,0x6222,0x6223,0x6227,0x6229,0x622B,
0x6239,0x623D,0x6242,0x6243,0x6244,0x6246,0x624C,0x6250,
@@ -7399,7 +7399,7 @@ static uint16 tab_jisx0212_uni23[]={
0x6366,0x636C,0x636D,0x6371,0x6374,0x6375};
/* page 24 0x4021-0x407E */
-static uint16 tab_jisx0212_uni24[]={
+static const uint16 tab_jisx0212_uni24[]={
0x6378,0x637C,0x637D,0x637F,0x6382,0x6384,0x6387,0x638A,
0x6390,0x6394,0x6395,0x6399,0x639A,0x639E,0x63A4,0x63A6,
0x63AD,0x63AE,0x63AF,0x63BD,0x63C1,0x63C5,0x63C8,0x63CE,
@@ -7414,7 +7414,7 @@ static uint16 tab_jisx0212_uni24[]={
0x64A8,0x64AC,0x64B3,0x64BD,0x64BE,0x64BF};
/* page 25 0x4121-0x417E */
-static uint16 tab_jisx0212_uni25[]={
+static const uint16 tab_jisx0212_uni25[]={
0x64C4,0x64C9,0x64CA,0x64CB,0x64CC,0x64CE,0x64D0,0x64D1,
0x64D5,0x64D7,0x64E4,0x64E5,0x64E9,0x64EA,0x64ED,0x64F0,
0x64F5,0x64F7,0x64FB,0x64FF,0x6501,0x6504,0x6508,0x6509,
@@ -7429,7 +7429,7 @@ static uint16 tab_jisx0212_uni25[]={
0x660D,0x6611,0x6612,0x6615,0x6616,0x661D};
/* page 26 0x4221-0x427E */
-static uint16 tab_jisx0212_uni26[]={
+static const uint16 tab_jisx0212_uni26[]={
0x661E,0x6621,0x6622,0x6623,0x6624,0x6626,0x6629,0x662A,
0x662B,0x662C,0x662E,0x6630,0x6631,0x6633,0x6639,0x6637,
0x6640,0x6645,0x6646,0x664A,0x664C,0x6651,0x664E,0x6657,
@@ -7444,7 +7444,7 @@ static uint16 tab_jisx0212_uni26[]={
0x6747,0x6748,0x674C,0x6754,0x6755,0x675D};
/* page 27 0x4321-0x437E */
-static uint16 tab_jisx0212_uni27[]={
+static const uint16 tab_jisx0212_uni27[]={
0x6766,0x676C,0x676E,0x6774,0x6776,0x677B,0x6781,0x6784,
0x678E,0x678F,0x6791,0x6793,0x6796,0x6798,0x6799,0x679B,
0x67B0,0x67B1,0x67B2,0x67B5,0x67BB,0x67BC,0x67BD,0x67F9,
@@ -7459,7 +7459,7 @@ static uint16 tab_jisx0212_uni27[]={
0x68B2,0x68BB,0x68C5,0x68C8,0x68CC,0x68CF};
/* page 28 0x4421-0x447E */
-static uint16 tab_jisx0212_uni28[]={
+static const uint16 tab_jisx0212_uni28[]={
0x68D0,0x68D1,0x68D3,0x68D6,0x68D9,0x68DC,0x68DD,0x68E5,
0x68E8,0x68EA,0x68EB,0x68EC,0x68ED,0x68F0,0x68F1,0x68F5,
0x68F6,0x68FB,0x68FC,0x68FD,0x6906,0x6909,0x690A,0x6910,
@@ -7474,7 +7474,7 @@ static uint16 tab_jisx0212_uni28[]={
0x6A1D,0x6A20,0x6A24,0x6A28,0x6A30,0x6A32};
/* page 29 0x4521-0x457E */
-static uint16 tab_jisx0212_uni29[]={
+static const uint16 tab_jisx0212_uni29[]={
0x6A34,0x6A37,0x6A3B,0x6A3E,0x6A3F,0x6A45,0x6A46,0x6A49,
0x6A4A,0x6A4E,0x6A50,0x6A51,0x6A52,0x6A55,0x6A56,0x6A5B,
0x6A64,0x6A67,0x6A6A,0x6A71,0x6A73,0x6A7E,0x6A81,0x6A83,
@@ -7489,7 +7489,7 @@ static uint16 tab_jisx0212_uni29[]={
0x6B67,0x6B6B,0x6B6E,0x6B70,0x6B75,0x6B7D};
/* page 30 0x4621-0x467E */
-static uint16 tab_jisx0212_uni30[]={
+static const uint16 tab_jisx0212_uni30[]={
0x6B7E,0x6B82,0x6B85,0x6B97,0x6B9B,0x6B9F,0x6BA0,0x6BA2,
0x6BA3,0x6BA8,0x6BA9,0x6BAC,0x6BAD,0x6BAE,0x6BB0,0x6BB8,
0x6BB9,0x6BBD,0x6BBE,0x6BC3,0x6BC4,0x6BC9,0x6BCC,0x6BD6,
@@ -7504,7 +7504,7 @@ static uint16 tab_jisx0212_uni30[]={
0x6CCF,0x6CD0,0x6CD1,0x6CD2,0x6CD4,0x6CD6};
/* page 31 0x4721-0x477E */
-static uint16 tab_jisx0212_uni31[]={
+static const uint16 tab_jisx0212_uni31[]={
0x6CDA,0x6CDC,0x6CE0,0x6CE7,0x6CE9,0x6CEB,0x6CEC,0x6CEE,
0x6CF2,0x6CF4,0x6D04,0x6D07,0x6D0A,0x6D0E,0x6D0F,0x6D11,
0x6D13,0x6D1A,0x6D26,0x6D27,0x6D28,0x6C67,0x6D2E,0x6D2F,
@@ -7519,7 +7519,7 @@ static uint16 tab_jisx0212_uni31[]={
0x6E53,0x6E54,0x6E57,0x6E5C,0x6E5D,0x6E5E};
/* page 32 0x4821-0x487E */
-static uint16 tab_jisx0212_uni32[]={
+static const uint16 tab_jisx0212_uni32[]={
0x6E62,0x6E63,0x6E68,0x6E73,0x6E7B,0x6E7D,0x6E8D,0x6E93,
0x6E99,0x6EA0,0x6EA7,0x6EAD,0x6EAE,0x6EB1,0x6EB3,0x6EBB,
0x6EBF,0x6EC0,0x6EC1,0x6EC3,0x6EC7,0x6EC8,0x6ECA,0x6ECD,
@@ -7534,7 +7534,7 @@ static uint16 tab_jisx0212_uni32[]={
0x6FB6,0x6FBC,0x6FC5,0x6FC7,0x6FC8,0x6FCA};
/* page 33 0x4921-0x497E */
-static uint16 tab_jisx0212_uni33[]={
+static const uint16 tab_jisx0212_uni33[]={
0x6FDA,0x6FDE,0x6FE8,0x6FE9,0x6FF0,0x6FF5,0x6FF9,0x6FFC,
0x6FFD,0x7000,0x7005,0x7006,0x7007,0x700D,0x7017,0x7020,
0x7023,0x702F,0x7034,0x7037,0x7039,0x703C,0x7043,0x7044,
@@ -7549,7 +7549,7 @@ static uint16 tab_jisx0212_uni33[]={
0x7152,0x7157,0x715A,0x715C,0x715E,0x7160};
/* page 34 0x4A21-0x4A7E */
-static uint16 tab_jisx0212_uni34[]={
+static const uint16 tab_jisx0212_uni34[]={
0x7168,0x7179,0x7180,0x7185,0x7187,0x718C,0x7192,0x719A,
0x719B,0x71A0,0x71A2,0x71AF,0x71B0,0x71B2,0x71B3,0x71BA,
0x71BF,0x71C0,0x71C1,0x71C4,0x71CB,0x71CC,0x71D3,0x71D6,
@@ -7564,7 +7564,7 @@ static uint16 tab_jisx0212_uni34[]={
0x72DF,0x72E5,0x72F3,0x72F4,0x72FA,0x72FB};
/* page 35 0x4B21-0x4B7E */
-static uint16 tab_jisx0212_uni35[]={
+static const uint16 tab_jisx0212_uni35[]={
0x72FE,0x7302,0x7304,0x7305,0x7307,0x730B,0x730D,0x7312,
0x7313,0x7318,0x7319,0x731E,0x7322,0x7324,0x7327,0x7328,
0x732C,0x7331,0x7332,0x7335,0x733A,0x733B,0x733D,0x7343,
@@ -7579,7 +7579,7 @@ static uint16 tab_jisx0212_uni35[]={
0x73F5,0x73F7,0x73F9,0x73FA,0x73FB,0x73FD};
/* page 36 0x4C21-0x4C7E */
-static uint16 tab_jisx0212_uni36[]={
+static const uint16 tab_jisx0212_uni36[]={
0x73FF,0x7400,0x7401,0x7404,0x7407,0x740A,0x7411,0x741A,
0x741B,0x7424,0x7426,0x7428,0x7429,0x742A,0x742B,0x742C,
0x742D,0x742E,0x742F,0x7430,0x7431,0x7439,0x7440,0x7443,
@@ -7594,7 +7594,7 @@ static uint16 tab_jisx0212_uni36[]={
0x74F4,0x74FA,0x74FB,0x74FC,0x74FF,0x7506};
/* page 37 0x4D21-0x4D7E */
-static uint16 tab_jisx0212_uni37[]={
+static const uint16 tab_jisx0212_uni37[]={
0x7512,0x7516,0x7517,0x7520,0x7521,0x7524,0x7527,0x7529,
0x752A,0x752F,0x7536,0x7539,0x753D,0x753E,0x753F,0x7540,
0x7543,0x7547,0x7548,0x754E,0x7550,0x7552,0x7557,0x755E,
@@ -7609,7 +7609,7 @@ static uint16 tab_jisx0212_uni37[]={
0x762D,0x7632,0x7633,0x7635,0x7638,0x7639};
/* page 38 0x4E21-0x4E7E */
-static uint16 tab_jisx0212_uni38[]={
+static const uint16 tab_jisx0212_uni38[]={
0x763A,0x763C,0x764A,0x7640,0x7641,0x7643,0x7644,0x7645,
0x7649,0x764B,0x7655,0x7659,0x765F,0x7664,0x7665,0x766D,
0x766E,0x766F,0x7671,0x7674,0x7681,0x7685,0x768C,0x768D,
@@ -7624,7 +7624,7 @@ static uint16 tab_jisx0212_uni38[]={
0x7757,0x775C,0x775E,0x775F,0x7760,0x7762};
/* page 39 0x4F21-0x4F7E */
-static uint16 tab_jisx0212_uni39[]={
+static const uint16 tab_jisx0212_uni39[]={
0x7764,0x7767,0x776A,0x776C,0x7770,0x7772,0x7773,0x7774,
0x777A,0x777D,0x7780,0x7784,0x778C,0x778D,0x7794,0x7795,
0x7796,0x779A,0x779F,0x77A2,0x77A7,0x77AA,0x77AE,0x77AF,
@@ -7639,7 +7639,7 @@ static uint16 tab_jisx0212_uni39[]={
0x78AC,0x78AD,0x78B0,0x78B1,0x78B2,0x78B3};
/* page 40 0x5021-0x507E */
-static uint16 tab_jisx0212_uni40[]={
+static const uint16 tab_jisx0212_uni40[]={
0x78BB,0x78BD,0x78BF,0x78C7,0x78C8,0x78C9,0x78CC,0x78CE,
0x78D2,0x78D3,0x78D5,0x78D6,0x78E4,0x78DB,0x78DF,0x78E0,
0x78E1,0x78E6,0x78EA,0x78F2,0x78F3,0x7900,0x78F6,0x78F7,
@@ -7654,7 +7654,7 @@ static uint16 tab_jisx0212_uni40[]={
0x79CF,0x79D4,0x79D6,0x79DA,0x79DD,0x79DE};
/* page 41 0x5121-0x517E */
-static uint16 tab_jisx0212_uni41[]={
+static const uint16 tab_jisx0212_uni41[]={
0x79E0,0x79E2,0x79E5,0x79EA,0x79EB,0x79ED,0x79F1,0x79F8,
0x79FC,0x7A02,0x7A03,0x7A07,0x7A09,0x7A0A,0x7A0C,0x7A11,
0x7A15,0x7A1B,0x7A1E,0x7A21,0x7A27,0x7A2B,0x7A2D,0x7A2F,
@@ -7669,7 +7669,7 @@ static uint16 tab_jisx0212_uni41[]={
0x7B2A,0x7B2B,0x7B2D,0x7B2E,0x7B2F,0x7B30};
/* page 42 0x5221-0x527E */
-static uint16 tab_jisx0212_uni42[]={
+static const uint16 tab_jisx0212_uni42[]={
0x7B31,0x7B34,0x7B3D,0x7B3F,0x7B40,0x7B41,0x7B47,0x7B4E,
0x7B55,0x7B60,0x7B64,0x7B66,0x7B69,0x7B6A,0x7B6D,0x7B6F,
0x7B72,0x7B73,0x7B77,0x7B84,0x7B89,0x7B8E,0x7B90,0x7B91,
@@ -7684,7 +7684,7 @@ static uint16 tab_jisx0212_uni42[]={
0x7C59,0x7C5A,0x7C5B,0x7C5C,0x7C5D,0x7C5E};
/* page 43 0x5321-0x537E */
-static uint16 tab_jisx0212_uni43[]={
+static const uint16 tab_jisx0212_uni43[]={
0x7C61,0x7C63,0x7C67,0x7C69,0x7C6D,0x7C6E,0x7C70,0x7C72,
0x7C79,0x7C7C,0x7C7D,0x7C86,0x7C87,0x7C8F,0x7C94,0x7C9E,
0x7CA0,0x7CA6,0x7CB0,0x7CB6,0x7CB7,0x7CBA,0x7CBB,0x7CBC,
@@ -7699,7 +7699,7 @@ static uint16 tab_jisx0212_uni43[]={
0x7D8C,0x7D8D,0x7D91,0x7D96,0x7D97,0x7D9D};
/* page 44 0x5421-0x547E */
-static uint16 tab_jisx0212_uni44[]={
+static const uint16 tab_jisx0212_uni44[]={
0x7D9E,0x7DA6,0x7DA7,0x7DAA,0x7DB3,0x7DB6,0x7DB7,0x7DB9,
0x7DC2,0x7DC3,0x7DC4,0x7DC5,0x7DC6,0x7DCC,0x7DCD,0x7DCE,
0x7DD7,0x7DD9,0x7E00,0x7DE2,0x7DE5,0x7DE6,0x7DEA,0x7DEB,
@@ -7714,7 +7714,7 @@ static uint16 tab_jisx0212_uni44[]={
0x7F61,0x7F63,0x7F64,0x7F65,0x7F66,0x7F6D};
/* page 45 0x5521-0x557E */
-static uint16 tab_jisx0212_uni45[]={
+static const uint16 tab_jisx0212_uni45[]={
0x7F71,0x7F7D,0x7F7E,0x7F7F,0x7F80,0x7F8B,0x7F8D,0x7F8F,
0x7F90,0x7F91,0x7F96,0x7F97,0x7F9C,0x7FA1,0x7FA2,0x7FA6,
0x7FAA,0x7FAD,0x7FB4,0x7FBC,0x7FBF,0x7FC0,0x7FC3,0x7FC8,
@@ -7729,7 +7729,7 @@ static uint16 tab_jisx0212_uni45[]={
0x80D5,0x80D7,0x80D8,0x80E0,0x80ED,0x80EE};
/* page 46 0x5621-0x567E */
-static uint16 tab_jisx0212_uni46[]={
+static const uint16 tab_jisx0212_uni46[]={
0x80F0,0x80F2,0x80F3,0x80F6,0x80F9,0x80FA,0x80FE,0x8103,
0x810B,0x8116,0x8117,0x8118,0x811C,0x811E,0x8120,0x8124,
0x8127,0x812C,0x8130,0x8135,0x813A,0x813C,0x8145,0x8147,
@@ -7744,7 +7744,7 @@ static uint16 tab_jisx0212_uni46[]={
0x8234,0x823A,0x8243,0x8244,0x8245,0x8246};
/* page 47 0x5721-0x577E */
-static uint16 tab_jisx0212_uni47[]={
+static const uint16 tab_jisx0212_uni47[]={
0x824B,0x824E,0x824F,0x8251,0x8256,0x825C,0x8260,0x8263,
0x8267,0x826D,0x8274,0x827B,0x827D,0x827F,0x8280,0x8281,
0x8283,0x8284,0x8287,0x8289,0x828A,0x828E,0x8291,0x8294,
@@ -7759,7 +7759,7 @@ static uint16 tab_jisx0212_uni47[]={
0x8351,0x8355,0x8356,0x8357,0x8370,0x8378};
/* page 48 0x5821-0x587E */
-static uint16 tab_jisx0212_uni48[]={
+static const uint16 tab_jisx0212_uni48[]={
0x837D,0x837F,0x8380,0x8382,0x8384,0x8386,0x838D,0x8392,
0x8394,0x8395,0x8398,0x8399,0x839B,0x839C,0x839D,0x83A6,
0x83A7,0x83A9,0x83AC,0x83BE,0x83BF,0x83C0,0x83C7,0x83C9,
@@ -7774,7 +7774,7 @@ static uint16 tab_jisx0212_uni48[]={
0x84C2,0x84C7,0x84C8,0x84CC,0x84CF,0x84D3};
/* page 49 0x5921-0x597E */
-static uint16 tab_jisx0212_uni49[]={
+static const uint16 tab_jisx0212_uni49[]={
0x84DC,0x84E7,0x84EA,0x84EF,0x84F0,0x84F1,0x84F2,0x84F7,
0x8532,0x84FA,0x84FB,0x84FD,0x8502,0x8503,0x8507,0x850C,
0x850E,0x8510,0x851C,0x851E,0x8522,0x8523,0x8524,0x8525,
@@ -7789,7 +7789,7 @@ static uint16 tab_jisx0212_uni49[]={
0x85E6,0x85E8,0x85ED,0x85F3,0x85F6,0x85FC};
/* page 50 0x5A21-0x5A7E */
-static uint16 tab_jisx0212_uni50[]={
+static const uint16 tab_jisx0212_uni50[]={
0x85FF,0x8600,0x8604,0x8605,0x860D,0x860E,0x8610,0x8611,
0x8612,0x8618,0x8619,0x861B,0x861E,0x8621,0x8627,0x8629,
0x8636,0x8638,0x863A,0x863C,0x863D,0x8640,0x8642,0x8646,
@@ -7804,7 +7804,7 @@ static uint16 tab_jisx0212_uni50[]={
0x8714,0x8719,0x871E,0x871F,0x8721,0x8723};
/* page 51 0x5B21-0x5B7E */
-static uint16 tab_jisx0212_uni51[]={
+static const uint16 tab_jisx0212_uni51[]={
0x8728,0x872E,0x872F,0x8731,0x8732,0x8739,0x873A,0x873C,
0x873D,0x873E,0x8740,0x8743,0x8745,0x874D,0x8758,0x875D,
0x8761,0x8764,0x8765,0x876F,0x8771,0x8772,0x877B,0x8783,
@@ -7819,7 +7819,7 @@ static uint16 tab_jisx0212_uni51[]={
0x8828,0x882D,0x882E,0x8830,0x8832,0x8835};
/* page 52 0x5C21-0x5C7E */
-static uint16 tab_jisx0212_uni52[]={
+static const uint16 tab_jisx0212_uni52[]={
0x883A,0x883C,0x8841,0x8843,0x8845,0x8848,0x8849,0x884A,
0x884B,0x884E,0x8851,0x8855,0x8856,0x8858,0x885A,0x885C,
0x885F,0x8860,0x8864,0x8869,0x8871,0x8879,0x887B,0x8880,
@@ -7834,7 +7834,7 @@ static uint16 tab_jisx0212_uni52[]={
0x896B,0x896E,0x8970,0x8973,0x8975,0x897A};
/* page 53 0x5D21-0x5D7E */
-static uint16 tab_jisx0212_uni53[]={
+static const uint16 tab_jisx0212_uni53[]={
0x897B,0x897C,0x897D,0x8989,0x898D,0x8990,0x8994,0x8995,
0x899B,0x899C,0x899F,0x89A0,0x89A5,0x89B0,0x89B4,0x89B5,
0x89B6,0x89B7,0x89BC,0x89D4,0x89D5,0x89D6,0x89D7,0x89D8,
@@ -7849,7 +7849,7 @@ static uint16 tab_jisx0212_uni53[]={
0x8A9F,0x8AA7,0x8AA9,0x8AAE,0x8AAF,0x8AB3};
/* page 54 0x5E21-0x5E7E */
-static uint16 tab_jisx0212_uni54[]={
+static const uint16 tab_jisx0212_uni54[]={
0x8AB6,0x8AB7,0x8ABB,0x8ABE,0x8AC3,0x8AC6,0x8AC8,0x8AC9,
0x8ACA,0x8AD1,0x8AD3,0x8AD4,0x8AD5,0x8AD7,0x8ADD,0x8ADF,
0x8AEC,0x8AF0,0x8AF4,0x8AF5,0x8AF6,0x8AFC,0x8AFF,0x8B05,
@@ -7864,7 +7864,7 @@ static uint16 tab_jisx0212_uni54[]={
0x8C73,0x8C75,0x8C76,0x8C7B,0x8C7E,0x8C86};
/* page 55 0x5F21-0x5F7E */
-static uint16 tab_jisx0212_uni55[]={
+static const uint16 tab_jisx0212_uni55[]={
0x8C87,0x8C8B,0x8C90,0x8C92,0x8C93,0x8C99,0x8C9B,0x8C9C,
0x8CA4,0x8CB9,0x8CBA,0x8CC5,0x8CC6,0x8CC9,0x8CCB,0x8CCF,
0x8CD6,0x8CD5,0x8CD9,0x8CDD,0x8CE1,0x8CE8,0x8CEC,0x8CEF,
@@ -7879,7 +7879,7 @@ static uint16 tab_jisx0212_uni55[]={
0x8E11,0x8E14,0x8E16,0x8E20,0x8E21,0x8E22};
/* page 56 0x6021-0x607E */
-static uint16 tab_jisx0212_uni56[]={
+static const uint16 tab_jisx0212_uni56[]={
0x8E23,0x8E26,0x8E27,0x8E31,0x8E33,0x8E36,0x8E37,0x8E38,
0x8E39,0x8E3D,0x8E40,0x8E41,0x8E4B,0x8E4D,0x8E4E,0x8E4F,
0x8E54,0x8E5B,0x8E5C,0x8E5D,0x8E5E,0x8E61,0x8E62,0x8E69,
@@ -7894,7 +7894,7 @@ static uint16 tab_jisx0212_uni56[]={
0x8F35,0x8F36,0x8F37,0x8F3A,0x8F40,0x8F41};
/* page 57 0x6121-0x617E */
-static uint16 tab_jisx0212_uni57[]={
+static const uint16 tab_jisx0212_uni57[]={
0x8F43,0x8F47,0x8F4F,0x8F51,0x8F52,0x8F53,0x8F54,0x8F55,
0x8F58,0x8F5D,0x8F5E,0x8F65,0x8F9D,0x8FA0,0x8FA1,0x8FA4,
0x8FA5,0x8FA6,0x8FB5,0x8FB6,0x8FB8,0x8FBE,0x8FC0,0x8FC1,
@@ -7909,7 +7909,7 @@ static uint16 tab_jisx0212_uni57[]={
0x90B4,0x90B6,0x90BD,0x90CC,0x90BE,0x90C3};
/* page 58 0x6221-0x627E */
-static uint16 tab_jisx0212_uni58[]={
+static const uint16 tab_jisx0212_uni58[]={
0x90C4,0x90C5,0x90C7,0x90C8,0x90D5,0x90D7,0x90D8,0x90D9,
0x90DC,0x90DD,0x90DF,0x90E5,0x90D2,0x90F6,0x90EB,0x90EF,
0x90F0,0x90F4,0x90FE,0x90FF,0x9100,0x9104,0x9105,0x9106,
@@ -7924,7 +7924,7 @@ static uint16 tab_jisx0212_uni58[]={
0x91B3,0x91B6,0x91BB,0x91BC,0x91BD,0x91BF};
/* page 59 0x6321-0x637E */
-static uint16 tab_jisx0212_uni59[]={
+static const uint16 tab_jisx0212_uni59[]={
0x91C2,0x91C3,0x91C5,0x91D3,0x91D4,0x91D7,0x91D9,0x91DA,
0x91DE,0x91E4,0x91E5,0x91E9,0x91EA,0x91EC,0x91ED,0x91EE,
0x91EF,0x91F0,0x91F1,0x91F7,0x91F9,0x91FB,0x91FD,0x9200,
@@ -7939,7 +7939,7 @@ static uint16 tab_jisx0212_uni59[]={
0x9289,0x928A,0x928D,0x928E,0x9292,0x9297};
/* page 60 0x6421-0x647E */
-static uint16 tab_jisx0212_uni60[]={
+static const uint16 tab_jisx0212_uni60[]={
0x9299,0x929F,0x92A0,0x92A4,0x92A5,0x92A7,0x92A8,0x92AB,
0x92AF,0x92B2,0x92B6,0x92B8,0x92BA,0x92BB,0x92BC,0x92BD,
0x92BF,0x92C0,0x92C1,0x92C2,0x92C3,0x92C5,0x92C6,0x92C7,
@@ -7954,7 +7954,7 @@ static uint16 tab_jisx0212_uni60[]={
0x936F,0x9370,0x9371,0x9373,0x9374,0x9376};
/* page 61 0x6521-0x657E */
-static uint16 tab_jisx0212_uni61[]={
+static const uint16 tab_jisx0212_uni61[]={
0x937A,0x937D,0x937F,0x9380,0x9381,0x9382,0x9388,0x938A,
0x938B,0x938D,0x938F,0x9392,0x9395,0x9398,0x939B,0x939E,
0x93A1,0x93A3,0x93A4,0x93A6,0x93A8,0x93AB,0x93B4,0x93B5,
@@ -7969,7 +7969,7 @@ static uint16 tab_jisx0212_uni61[]={
0x9471,0x9472,0x9484,0x9483,0x9578,0x9579};
/* page 62 0x6621-0x667E */
-static uint16 tab_jisx0212_uni62[]={
+static const uint16 tab_jisx0212_uni62[]={
0x957E,0x9584,0x9588,0x958C,0x958D,0x958E,0x959D,0x959E,
0x959F,0x95A1,0x95A6,0x95A9,0x95AB,0x95AC,0x95B4,0x95B6,
0x95BA,0x95BD,0x95BF,0x95C6,0x95C8,0x95C9,0x95CB,0x95D0,
@@ -7984,7 +7984,7 @@ static uint16 tab_jisx0212_uni62[]={
0x96DF,0x96E9,0x96EF,0x96F1,0x96FA,0x9702};
/* page 63 0x6721-0x677E */
-static uint16 tab_jisx0212_uni63[]={
+static const uint16 tab_jisx0212_uni63[]={
0x9703,0x9705,0x9709,0x971A,0x971B,0x971D,0x9721,0x9722,
0x9723,0x9728,0x9731,0x9733,0x9741,0x9743,0x974A,0x974E,
0x974F,0x9755,0x9757,0x9758,0x975A,0x975B,0x9763,0x9767,
@@ -7999,7 +7999,7 @@ static uint16 tab_jisx0212_uni63[]={
0x9816,0x981C,0x981E,0x9820,0x9823,0x9826};
/* page 64 0x6821-0x687E */
-static uint16 tab_jisx0212_uni64[]={
+static const uint16 tab_jisx0212_uni64[]={
0x982B,0x982E,0x982F,0x9830,0x9832,0x9833,0x9835,0x9825,
0x983E,0x9844,0x9847,0x984A,0x9851,0x9852,0x9853,0x9856,
0x9857,0x9859,0x985A,0x9862,0x9863,0x9865,0x9866,0x986A,
@@ -8014,7 +8014,7 @@ static uint16 tab_jisx0212_uni64[]={
0x999F,0x99A6,0x99B0,0x99B1,0x99B2,0x99B5};
/* page 65 0x6921-0x697E */
-static uint16 tab_jisx0212_uni65[]={
+static const uint16 tab_jisx0212_uni65[]={
0x99B9,0x99BA,0x99BD,0x99BF,0x99C3,0x99C9,0x99D3,0x99D4,
0x99D9,0x99DA,0x99DC,0x99DE,0x99E7,0x99EA,0x99EB,0x99EC,
0x99F0,0x99F4,0x99F5,0x99F9,0x99FD,0x99FE,0x9A02,0x9A03,
@@ -8029,7 +8029,7 @@ static uint16 tab_jisx0212_uni65[]={
0x9AFD,0x9AFF,0x9B00,0x9B01,0x9B02,0x9B03};
/* page 66 0x6A21-0x6A7E */
-static uint16 tab_jisx0212_uni66[]={
+static const uint16 tab_jisx0212_uni66[]={
0x9B04,0x9B05,0x9B08,0x9B09,0x9B0B,0x9B0C,0x9B0D,0x9B0E,
0x9B10,0x9B12,0x9B16,0x9B19,0x9B1B,0x9B1C,0x9B20,0x9B26,
0x9B2B,0x9B2D,0x9B33,0x9B34,0x9B35,0x9B37,0x9B39,0x9B3A,
@@ -8044,7 +8044,7 @@ static uint16 tab_jisx0212_uni66[]={
0x9BEA,0x9BEB,0x9BEF,0x9BF3,0x9BF7,0x9BF8};
/* page 67 0x6B21-0x6B7E */
-static uint16 tab_jisx0212_uni67[]={
+static const uint16 tab_jisx0212_uni67[]={
0x9BF9,0x9BFA,0x9BFD,0x9BFF,0x9C00,0x9C02,0x9C0B,0x9C0F,
0x9C11,0x9C16,0x9C18,0x9C19,0x9C1A,0x9C1C,0x9C1E,0x9C22,
0x9C23,0x9C26,0x9C27,0x9C28,0x9C29,0x9C2A,0x9C31,0x9C35,
@@ -8059,7 +8059,7 @@ static uint16 tab_jisx0212_uni67[]={
0x9D6A,0x9D6B,0x9D70,0x9D76,0x9D77,0x9D7B};
/* page 68 0x6C21-0x6C7E */
-static uint16 tab_jisx0212_uni68[]={
+static const uint16 tab_jisx0212_uni68[]={
0x9D7C,0x9D7E,0x9D83,0x9D84,0x9D86,0x9D8A,0x9D8D,0x9D8E,
0x9D92,0x9D93,0x9D95,0x9D96,0x9D97,0x9D98,0x9DA1,0x9DAA,
0x9DAC,0x9DAE,0x9DB1,0x9DB5,0x9DB9,0x9DBC,0x9DBF,0x9DC3,
@@ -8074,7 +8074,7 @@ static uint16 tab_jisx0212_uni68[]={
0x9EED,0x9EEE,0x9EF0,0x9EF1,0x9EF2,0x9EF5};
/* page 69 0x6D21-0x6D63 */
-static uint16 tab_jisx0212_uni69[]={
+static const uint16 tab_jisx0212_uni69[]={
0x9EF8,0x9EFF,0x9F02,0x9F03,0x9F09,0x9F0F,0x9F10,0x9F11,
0x9F12,0x9F14,0x9F16,0x9F17,0x9F19,0x9F1A,0x9F1B,0x9F1F,
0x9F22,0x9F26,0x9F2A,0x9F2B,0x9F2F,0x9F31,0x9F32,0x9F34,
@@ -8542,7 +8542,7 @@ static MY_CHARSET_HANDLER my_charset_han
-CHARSET_INFO my_charset_ujis_japanese_ci=
+struct charset_info_st my_charset_ujis_japanese_ci=
{
12,0,0, /* number */
MY_CS_COMPILED|MY_CS_PRIMARY, /* state */
@@ -8575,7 +8575,7 @@ CHARSET_INFO my_charset_ujis_japanese_ci
};
-CHARSET_INFO my_charset_ujis_bin=
+struct charset_info_st my_charset_ujis_bin=
{
91,0,0, /* number */
MY_CS_COMPILED|MY_CS_BINSORT, /* state */
=== modified file 'strings/ctype-utf8.c'
--- a/strings/ctype-utf8.c 2009-10-15 21:38:29 +0000
+++ b/strings/ctype-utf8.c 2010-01-06 19:20:16 +0000
@@ -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_INF
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_IN
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
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_INF
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
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_INF
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_I
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_I
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_I
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_handl
-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_
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(CHARSE
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
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 f
*/
-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_fil
-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,
=== modified file 'strings/ctype-win1250ch.c'
--- a/strings/ctype-win1250ch.c 2007-05-10 09:59:39 +0000
+++ b/strings/ctype-win1250ch.c 2010-01-06 19:20:16 +0000
@@ -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(CHAR
#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
};
-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 */
=== modified file 'strings/ctype.c'
--- a/strings/ctype.c 2009-09-07 20:50:10 +0000
+++ b/strings/ctype.c 2010-01-06 19:20:16 +0000
@@ -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 si
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,co
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,co
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,co
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;
=== modified file 'strings/int2str.c'
--- a/strings/int2str.c 2007-10-31 09:34:26 +0000
+++ b/strings/int2str.c 2010-01-06 19:20:16 +0000
@@ -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 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)
1
0

[Maria-developers] [Branch ~maria-captains/maria/5.1] Rev 2790: Automatic merge.
by noreplyï¼ launchpad.net 06 Jan '10
by noreplyï¼ launchpad.net 06 Jan '10
06 Jan '10
Merge authors:
Kristian Nielsen (knielsen)
Michael Widenius (monty)
Paul McCullagh (paul-mccullagh)
Sergey Petrunia (sergefp)
Vladimir Kolesnikov (vkolesnikov)
Related merge proposals:
https://code.launchpad.net/~paul-mccullagh/maria/maria-pbxt-1009g/+merge/16…
proposed by: Paul McCullagh (paul-mccullagh)
review: Approve - Kristian Nielsen (knielsen)
https://code.launchpad.net/~vkolesnikov/maria/maria-pbxt-bug-439889/+merge/…
proposed by: Vladimir Kolesnikov (vkolesnikov)
review: Approve - Kristian Nielsen (knielsen)
------------------------------------------------------------
revno: 2790 [merge]
committer: knielsen(a)knielsen-hq.org
branch nick: mariadb-5.1
timestamp: Wed 2010-01-06 12:29:19 +0100
message:
Automatic merge.
renamed:
mysql-test/suite/pbxt/t/load_unique_error1.inc => mysql-test/std_data/pbxt_load_unique_error1.inc
modified:
.bzrignore
config/ac-macros/plugins.m4
configure.in
mysql-test/mysql-test-run.pl
mysql-test/suite/pbxt/r/join_nested.result
mysql-test/suite/pbxt/r/pbxt_bugs.result
mysql-test/suite/pbxt/t/join_nested.test
mysql-test/suite/pbxt/t/pbxt_bugs.test
mysql-test/suite/pbxt/t/pbxt_locking.test
mysql-test/suite/pbxt/t/pbxt_transactions.test
mysql-test/suite/pbxt/t/ps_1general.test
sql/handler.h
sql/sql_plugin.cc
storage/pbxt/ChangeLog
storage/pbxt/plug.in
storage/pbxt/src/Makefile.am
storage/pbxt/src/discover_xt.cc
storage/pbxt/src/ha_pbxt.cc
storage/pbxt/src/strutil_xt.cc
storage/pbxt/src/table_xt.cc
storage/pbxt/src/thread_xt.cc
storage/pbxt/src/trace_xt.cc
--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1
Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2790)
by knielsenï¼ knielsen-hq.org 06 Jan '10
by knielsenï¼ knielsen-hq.org 06 Jan '10
06 Jan '10
#At lp:maria
2790 knielsen(a)knielsen-hq.org 2010-01-06 [merge]
Automatic merge.
renamed:
mysql-test/suite/pbxt/t/load_unique_error1.inc => mysql-test/std_data/pbxt_load_unique_error1.inc
modified:
.bzrignore
config/ac-macros/plugins.m4
configure.in
mysql-test/mysql-test-run.pl
mysql-test/suite/pbxt/r/join_nested.result
mysql-test/suite/pbxt/r/pbxt_bugs.result
mysql-test/suite/pbxt/t/join_nested.test
mysql-test/suite/pbxt/t/pbxt_bugs.test
mysql-test/suite/pbxt/t/pbxt_locking.test
mysql-test/suite/pbxt/t/pbxt_transactions.test
mysql-test/suite/pbxt/t/ps_1general.test
sql/handler.h
sql/sql_plugin.cc
storage/pbxt/ChangeLog
storage/pbxt/plug.in
storage/pbxt/src/Makefile.am
storage/pbxt/src/discover_xt.cc
storage/pbxt/src/ha_pbxt.cc
storage/pbxt/src/strutil_xt.cc
storage/pbxt/src/table_xt.cc
storage/pbxt/src/thread_xt.cc
storage/pbxt/src/trace_xt.cc
=== modified file '.bzrignore'
--- a/.bzrignore 2009-12-03 11:34:11 +0000
+++ b/.bzrignore 2009-12-22 13:50:20 +0000
@@ -666,6 +666,9 @@ libmysqld/time.cc
libmysqld/tztime.cc
libmysqld/uniques.cc
libmysqld/unireg.cc
+libmysqld/discover_xt.cc
+libmysqld/ha_pbxt.cc
+libmysqld/myxt_xt.cc
libmysqltest/*.ds?
libmysqltest/*.vcproj
libmysqltest/mytest.c
=== modified file 'config/ac-macros/plugins.m4'
--- a/config/ac-macros/plugins.m4 2009-04-25 10:05:32 +0000
+++ b/config/ac-macros/plugins.m4 2009-12-22 10:33:20 +0000
@@ -267,7 +267,6 @@ dnl we have to recompile these modules
dnl to compile server parts with the different #defines
dnl Normally it happens when we compile the embedded server
dnl Thus one should mark such files in his handler using this macro
-dnl (currently only one such a file per plugin is supported)
dnl
dnl ---------------------------------------------------------------------------
@@ -463,11 +462,13 @@ dnl Although this is "pretty", it breaks
mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
[with_plugin_]$2=yes
AC_MSG_RESULT([yes])
- m4_ifdef([$11],[
- condition_dependent_plugin_modules="$condition_dependent_plugin_modules m4_bregexp($11, [[^/]+$], [\&])"
- condition_dependent_plugin_objects="$condition_dependent_plugin_objects m4_bregexp($11, [[^/]+\.], [\&o])"
- condition_dependent_plugin_links="$condition_dependent_plugin_links $6/$11"
- condition_dependent_plugin_includes="$condition_dependent_plugin_includes -I[\$(top_srcdir)]/$6/m4_bregexp($11, [^.+[/$]], [\&])"
+ m4_ifdef([$11], [
+ m4_foreach([plugin], [$11], [
+ condition_dependent_plugin_modules="$condition_dependent_plugin_modules m4_bregexp(plugin, [[^/]+$], [\&])"
+ condition_dependent_plugin_objects="$condition_dependent_plugin_objects m4_bregexp(plugin, [[^/]+\.], [\&o])"
+ condition_dependent_plugin_links="$condition_dependent_plugin_links $6/plugin"
+ condition_dependent_plugin_includes="$condition_dependent_plugin_includes -I[\$(top_srcdir)]/$6/m4_bregexp(plugin, [^.+[/$]], [\&])"
+ ])
])
fi
fi
=== modified file 'configure.in'
--- a/configure.in 2009-12-03 11:34:11 +0000
+++ b/configure.in 2009-12-23 08:32:14 +0000
@@ -15,7 +15,7 @@ AC_CANONICAL_SYSTEM
# MySQL version number.
#
# Note: the following line must be parseable by win/configure.js:GetVersion()
-AM_INIT_AUTOMAKE(mysql, 5.1.41-MariaDB-beta)
+AM_INIT_AUTOMAKE(mysql, 5.1.41-MariaDB-rc)
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2009-12-21 16:26:36 +0000
+++ b/mysql-test/mysql-test-run.pl 2010-01-05 14:28:34 +0000
@@ -301,6 +301,9 @@ sub main {
}
}
+ # Check for plugin availability so we know whether to skip tests or not.
+ detect_plugins();
+
mtr_report("Collecting tests...");
my $tests= collect_test_cases($opt_suites, \@opt_cases);
@@ -1877,6 +1880,37 @@ sub have_maria_support () {
}
+# Detect plugin presense and set environment variables appropriately.
+# This needs to be done early, so we can know whether to skip tests.
+sub detect_plugins {
+ # --------------------------------------------------------------------------
+ # Add the path where mysqld will find ha_example.so
+ # --------------------------------------------------------------------------
+ if ($mysql_version_id >= 50100) {
+ my $plugin_filename;
+ if (IS_WINDOWS)
+ {
+ $plugin_filename = "ha_example.dll";
+ }
+ else
+ {
+ $plugin_filename = "ha_example.so";
+ }
+ my $lib_example_plugin=
+ mtr_file_exists(vs_config_dirs('storage/example',$plugin_filename),
+ "$basedir/storage/example/.libs/".$plugin_filename,
+ "$basedir/lib/mariadb/plugin/".$plugin_filename,
+ "$basedir/lib/mysql/plugin/".$plugin_filename);
+ $ENV{'EXAMPLE_PLUGIN'}=
+ ($lib_example_plugin ? basename($lib_example_plugin) : "");
+ $ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=".
+ ($lib_example_plugin ? dirname($lib_example_plugin) : "");
+
+ $ENV{'HA_EXAMPLE_SO'}="'".$plugin_filename."'";
+ $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=EXAMPLE=".$plugin_filename;
+ }
+}
+
#
# Set environment to be used by childs of this process for
# things that are constant during the whole lifetime of mysql-test-run
@@ -1935,33 +1969,6 @@ sub environment_setup {
$ENV{'UDF_EXAMPLE_LIB_OPT'}= "--plugin-dir=".
($lib_udf_example ? dirname($lib_udf_example) : "");
- # --------------------------------------------------------------------------
- # Add the path where mysqld will find ha_example.so
- # --------------------------------------------------------------------------
- if ($mysql_version_id >= 50100) {
- my $plugin_filename;
- if (IS_WINDOWS)
- {
- $plugin_filename = "ha_example.dll";
- }
- else
- {
- $plugin_filename = "ha_example.so";
- }
- my $lib_example_plugin=
- mtr_file_exists(vs_config_dirs('storage/example',$plugin_filename),
- "$basedir/storage/example/.libs/".$plugin_filename,
- "$basedir/lib/mariadb/plugin/".$plugin_filename,
- "$basedir/lib/mysql/plugin/".$plugin_filename);
- $ENV{'EXAMPLE_PLUGIN'}=
- ($lib_example_plugin ? basename($lib_example_plugin) : "");
- $ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=".
- ($lib_example_plugin ? dirname($lib_example_plugin) : "");
-
- $ENV{'HA_EXAMPLE_SO'}="'".$plugin_filename."'";
- $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=EXAMPLE=".$plugin_filename;
- }
-
# ----------------------------------------------------
# Add the path where mysqld will find mypluglib.so
# ----------------------------------------------------
=== renamed file 'mysql-test/suite/pbxt/t/load_unique_error1.inc' => 'mysql-test/std_data/pbxt_load_unique_error1.inc'
=== modified file 'mysql-test/suite/pbxt/r/join_nested.result'
--- a/mysql-test/suite/pbxt/r/join_nested.result 2009-11-24 10:19:08 +0000
+++ b/mysql-test/suite/pbxt/r/join_nested.result 2009-12-27 16:48:27 +0000
@@ -968,7 +968,7 @@ id select_type table type possible_keys
Warnings:
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
CREATE INDEX idx_b ON t8(b);
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -1003,22 +1003,23 @@ t0.b=t1.b AND
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00 Using where
-1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
-1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
-Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
-Warnings:
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 3
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join buffer
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3
+1 SIMPLE t3 ALL NULL NULL NULL NULL 2
+1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1
+1 SIMPLE t5 ALL idx_b NULL NULL NULL 3
+1 SIMPLE t6 ALL NULL NULL NULL NULL 3
+1 SIMPLE t7 ALL NULL NULL NULL NULL 2
+1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1
+1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using join buffer
+ATTENTION: the above EXPLAIN has several competing QEPs with identical
+. costs. To combat the plan change it uses --sorted_result and
+. and --replace tricks
CREATE INDEX idx_b ON t1(b);
CREATE INDEX idx_a ON t0(a);
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -1053,19 +1054,20 @@ t0.b=t1.b AND
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
-1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1 100.00 Using where
-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00 Using where
-1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
-1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
-Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
-Warnings:
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ref idx_a idx_a 5 const 1
+1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3
+1 SIMPLE t3 ALL NULL NULL NULL NULL 2
+1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1
+1 SIMPLE t5 ALL idx_b NULL NULL NULL 3
+1 SIMPLE t6 ALL NULL NULL NULL NULL 3
+1 SIMPLE t7 ALL NULL NULL NULL NULL 2
+1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1
+1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using join buffer
+ATTENTION: the above EXPLAIN has several competing QEPs with identical
+. costs. To combat the plan change it uses --sorted_result
+. and --replace tricks
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
=== modified file 'mysql-test/suite/pbxt/r/pbxt_bugs.result'
--- a/mysql-test/suite/pbxt/r/pbxt_bugs.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/pbxt_bugs.result 2009-12-22 10:33:20 +0000
@@ -1212,7 +1212,7 @@ c1
2147483647
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARCHAR(255));
-LOAD DATA LOCAL INFILE 'suite/pbxt/t/load_unique_error1.inc' REPLACE INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (@c1,c2) SET c1 = @c1 % 2;
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/pbxt_load_unique_error1.inc' REPLACE INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (@c1,c2) SET c1 = @c1 % 2;
SELECT * FROM t1 ORDER BY c1;
c1 c2
0 opq
=== modified file 'mysql-test/suite/pbxt/t/join_nested.test'
--- a/mysql-test/suite/pbxt/t/join_nested.test 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/t/join_nested.test 2009-12-27 16:48:27 +0000
@@ -546,8 +546,9 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.
CREATE INDEX idx_b ON t8(b);
+--replace_regex /Using where; // /Using where//
--sorted_result
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -582,12 +583,16 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
+--echo ATTENTION: the above EXPLAIN has several competing QEPs with identical
+--echo . costs. To combat the plan change it uses --sorted_result and
+--echo . and --replace tricks
CREATE INDEX idx_b ON t1(b);
CREATE INDEX idx_a ON t0(a);
+--replace_regex /Using where; // /Using where//
--sorted_result
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -622,6 +627,9 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
+--echo ATTENTION: the above EXPLAIN has several competing QEPs with identical
+--echo . costs. To combat the plan change it uses --sorted_result
+--echo . and --replace tricks
--sorted_result
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
=== modified file 'mysql-test/suite/pbxt/t/pbxt_bugs.test'
--- a/mysql-test/suite/pbxt/t/pbxt_bugs.test 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/t/pbxt_bugs.test 2009-12-22 10:33:20 +0000
@@ -921,7 +921,8 @@ SELECT c1 FROM t2;
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARCHAR(255));
-LOAD DATA LOCAL INFILE 'suite/pbxt/t/load_unique_error1.inc' REPLACE INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (@c1,c2) SET c1 = @c1 % 2;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/pbxt_load_unique_error1.inc' REPLACE INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (@c1,c2) SET c1 = @c1 % 2;
--sorted_result
SELECT * FROM t1 ORDER BY c1;
DROP TABLE t1;
=== modified file 'mysql-test/suite/pbxt/t/pbxt_locking.test'
--- a/mysql-test/suite/pbxt/t/pbxt_locking.test 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/t/pbxt_locking.test 2009-12-22 10:33:20 +0000
@@ -1,6 +1,9 @@
# This test covers various aspects of PBXT locking mechanism, including
# internal permanent/temporary row locking and MySQL locking
+# SHOW PROCESSLIST has hardcoded "Writing to net" as state.
+-- source include/not_embedded.inc
+
# TEST: select for update test
drop table if exists t1;
=== modified file 'mysql-test/suite/pbxt/t/pbxt_transactions.test'
--- a/mysql-test/suite/pbxt/t/pbxt_transactions.test 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/t/pbxt_transactions.test 2009-12-22 10:33:20 +0000
@@ -1,3 +1,6 @@
+# We cannot run mysqldump against embedded server.
+-- source include/not_embedded.inc
+
--disable_warnings
drop table if exists t1, t2, t3;
--enable_warnings
=== modified file 'mysql-test/suite/pbxt/t/ps_1general.test'
--- a/mysql-test/suite/pbxt/t/ps_1general.test 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/t/ps_1general.test 2009-12-22 10:33:20 +0000
@@ -582,7 +582,7 @@ prepare stmt1 from ' rename table t5 to
create table t5 (a int) ;
# rename must fail, t7 does not exist
# Clean up the filename here because embedded server reports whole path
---replace_result $MYSQLTEST_VARDIR . master-data/ '' t7.frm t7
+--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' t7.frm t7
--error 1017
execute stmt1 ;
create table t7 (a int) ;
=== modified file 'sql/handler.h'
--- a/sql/handler.h 2009-12-03 11:19:05 +0000
+++ b/sql/handler.h 2010-01-04 13:12:53 +0000
@@ -278,6 +278,11 @@ enum legacy_db_type
DB_TYPE_FIRST_DYNAMIC=42,
DB_TYPE_DEFAULT=127 // Must be last
};
+/*
+ Better name for DB_TYPE_UNKNOWN. Should be used for engines that do not have
+ a hard-coded type value here.
+ */
+#define DB_TYPE_AUTOASSIGN DB_TYPE_UNKNOWN
enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED,
ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED,
=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc 2009-12-03 11:19:05 +0000
+++ b/sql/sql_plugin.cc 2009-12-22 10:33:20 +0000
@@ -1168,22 +1168,7 @@ int plugin_init(int *argc, char **argv,
!my_strnncoll(&my_charset_latin1, (const uchar*) plugin->name,
6, (const uchar*) "InnoDB", 6))
continue;
-#ifdef EMBEDDED_LIBRARY
- /*
- MariaDB: disable PBXT in embedded server. We do this for two reasons
- - PBXT currently doesn't work in embedded server (see
- https://bugs.launchpad.net/maria/+bug/439889)
- - Embedded server is supposed to be "leaner" and our current
- understanding of that is "without PBXT". At the same time, we want
- regular server to be with PBXT, and since we don't support compiling
- embedded server with different options than the regular server,
- the only way was to disable PBXT from here.
- */
- if (!my_strnncoll(&my_charset_latin1, (const uchar*) plugin->name,
- 4, (const uchar*) "PBXT", 4))
- continue;
-#endif
bzero(&tmp, sizeof(tmp));
tmp.plugin= plugin;
tmp.name.str= (char *)plugin->name;
=== modified file 'storage/pbxt/ChangeLog'
--- a/storage/pbxt/ChangeLog 2009-12-01 09:50:46 +0000
+++ b/storage/pbxt/ChangeLog 2009-12-21 13:13:15 +0000
@@ -1,6 +1,10 @@
PBXT Release Notes
==================
+------- 1.0.09g RC3 - 2009-12-16
+
+RN292: Fixed a bug that resulted in 2-phase commit not being used between PBXT and the binlog. This bug was a result of a hack which as added to solve a problem in an pre-release version of MySQL 5.1. The hack was removed.
+
------- 1.0.09f RC3 - 2009-11-30
RN291: Fixed bug #489088: On shutdown MySQL reports: [Warning] Plugin 'PBXT' will be forced to shutdown.
=== modified file 'storage/pbxt/plug.in'
--- a/storage/pbxt/plug.in 2009-05-12 06:44:01 +0000
+++ b/storage/pbxt/plug.in 2009-12-09 21:39:23 +0000
@@ -5,3 +5,4 @@ MYSQL_PLUGIN_STATIC(pbxt, [src/libpbx
MYSQL_PLUGIN_ACTIONS(pbxt, [
# AC_CONFIG_FILES(storage/pbxt/src/Makefile)
])
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(pbxt, [[src/ha_pbxt.cc],[src/myxt_xt.cc],[src/discover_xt.cc]])
=== modified file 'storage/pbxt/src/Makefile.am'
--- a/storage/pbxt/src/Makefile.am 2009-11-24 10:55:06 +0000
+++ b/storage/pbxt/src/Makefile.am 2009-12-22 10:33:20 +0000
@@ -46,7 +46,5 @@ libpbxt_la_CFLAGS = $(AM_CFLAGS) -DMYSQ
EXTRA_LIBRARIES = libpbxt.a
noinst_LIBRARIES = libpbxt.a
libpbxt_a_SOURCES = $(libpbxt_la_SOURCES)
-libpbxt_a_CXXFLAGS = $(AM_CXXFLAGS)
-libpbxt_a_CFLAGS = $(AM_CFLAGS) -std=c99
EXTRA_DIST = pbms_enabled.cc win_inttypes.h
=== modified file 'storage/pbxt/src/discover_xt.cc'
--- a/storage/pbxt/src/discover_xt.cc 2009-12-16 08:13:18 +0000
+++ b/storage/pbxt/src/discover_xt.cc 2009-12-21 13:13:15 +0000
@@ -355,10 +355,10 @@ static int sort_keys(KEY *a, KEY *b)
{
if (!(b_flags & HA_NOSAME))
return -1;
- if ((a_flags ^ b_flags) & (HA_NULL_PART_KEY | HA_END_SPACE_KEY))
+ if ((a_flags ^ b_flags) & HA_NULL_PART_KEY)
{
/* Sort NOT NULL keys before other keys */
- return (a_flags & (HA_NULL_PART_KEY | HA_END_SPACE_KEY)) ? 1 : -1;
+ return (a_flags & HA_NULL_PART_KEY) ? 1 : -1;
}
if (a->name == primary_key_name)
return -1;
=== modified file 'storage/pbxt/src/ha_pbxt.cc'
--- a/storage/pbxt/src/ha_pbxt.cc 2009-11-27 15:37:02 +0000
+++ b/storage/pbxt/src/ha_pbxt.cc 2009-12-29 11:34:44 +0000
@@ -1175,8 +1175,13 @@ static int pbxt_init(void *p)
* +1 Temporary thread (e.g. TempForClose, TempForEnd)
*/
#ifndef DRIZZLED
- if (pbxt_max_threads == 0)
- pbxt_max_threads = max_connections + 7;
+ if (pbxt_max_threads == 0) {
+ // Embedded server sets max_connections=1
+ if (max_connections > 1)
+ pbxt_max_threads = max_connections + 7;
+ else
+ pbxt_max_threads = 100;
+ }
#endif
self = xt_init_threading(pbxt_max_threads); /* Create the main self: */
if (!self)
@@ -1442,7 +1447,7 @@ static int pbxt_commit(handlerton *hton,
XTThreadPtr self;
if ((self = (XTThreadPtr) *thd_ha_data(thd, hton))) {
- XT_PRINT1(self, "pbxt_commit all=%d\n", all);
+ XT_PRINT2(self, "%s pbxt_commit all=%d\n", all ? "END CONN XACT" : "END STAT", all);
if (self->st_xact_data) {
/* There are no table locks, commit immediately in all cases
@@ -1474,7 +1479,7 @@ static int pbxt_rollback(handlerton *hto
XTThreadPtr self;
if ((self = (XTThreadPtr) *thd_ha_data(thd, hton))) {
- XT_PRINT1(self, "pbxt_rollback all=%d in pbxt_commit\n", all);
+ XT_PRINT2(self, "%s pbxt_rollback all=%d\n", all ? "CONN END XACT" : "STAT END", all);
if (self->st_xact_data) {
/* There are no table locks, rollback immediately in all cases
@@ -1538,7 +1543,7 @@ static int pbxt_prepare(handlerton *hton
* except when this is a statement commit with an explicit
* transaction (!all && !self->st_auto_commit).
*/
- if (all) {
+ if (all || self->st_auto_commit) {
XID xid;
XT_PRINT0(self, "xt_xn_prepare in pbxt_prepare\n");
@@ -2620,26 +2625,7 @@ int ha_pbxt::write_row(byte *buf)
}
#endif
- /* GOTCHA: I have a huge problem with the transaction statement.
- * It is not ALWAYS committed (I mean ha_commit_trans() is
- * not always called - for example in SELECT).
- *
- * If I call trans_register_ha() but ha_commit_trans() is not called
- * then MySQL thinks a transaction is still running (while
- * I have committed the auto-transaction in ha_pbxt::external_lock()).
- *
- * This causes all kinds of problems, like transactions
- * are killed when they should not be.
- *
- * To prevent this, I only inform MySQL that a transaction
- * has beens started when an update is performed. I have determined that
- * ha_commit_trans() is only guarenteed to be called if an update is done.
- */
- if (!pb_open_tab->ot_thread->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(pb_open_tab->ot_thread, "ha_pbxt::write_row trans_register_ha all=FALSE\n");
- pb_open_tab->ot_thread->st_stat_trans = TRUE;
- }
+ /* {START-STAT-HACK} previously position of start statement hack. */
xt_xlog_check_long_writer(pb_open_tab->ot_thread);
@@ -2730,11 +2716,7 @@ int ha_pbxt::update_row(const byte * old
XT_DISABLED_TRACE(("UPDATE tx=%d val=%d\n", (int) self->st_xact_data->xd_start_xn_id, (int) XT_GET_DISK_4(&new_data[1])));
//statistic_increment(ha_update_count,&LOCK_status);
- if (!self->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(self, "ha_pbxt::update_row trans_register_ha all=FALSE\n");
- self->st_stat_trans = TRUE;
- }
+ /* {START-STAT-HACK} previously position of start statement hack. */
xt_xlog_check_long_writer(self);
@@ -2821,11 +2803,7 @@ int ha_pbxt::delete_row(const byte * buf
}
#endif
- if (!pb_open_tab->ot_thread->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(pb_open_tab->ot_thread, "ha_pbxt::delete_row trans_register_ha all=FALSE\n");
- pb_open_tab->ot_thread->st_stat_trans = TRUE;
- }
+ /* {START-STAT-HACK} previously position of start statement hack. */
xt_xlog_check_long_writer(pb_open_tab->ot_thread);
@@ -3155,15 +3133,12 @@ int ha_pbxt::index_init(uint idx, bool X
printf("index_init %s index %d cols req=%d/%d read_bits=%X write_bits=%X index_bits=%X\n", pb_open_tab->ot_table->tab_name->ps_path, (int) idx, pb_open_tab->ot_cols_req, pb_open_tab->ot_cols_req, (int) *table->read_set->bitmap, (int) *table->write_set->bitmap, (int) *ind->mi_col_map.bitmap);
#endif
+ /* {START-STAT-HACK} previously position of start statement hack,
+ * previous comment to code below: */
/* Start a statement based transaction as soon
* as a read is done for a modify type statement!
* Previously, this was done too late!
*/
- if (!thread->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(thread, "ha_pbxt::update_row trans_register_ha all=FALSE\n");
- thread->st_stat_trans = TRUE;
- }
}
else {
pb_open_tab->ot_cols_req = ha_get_max_bit(table->read_set);
@@ -3612,15 +3587,12 @@ int ha_pbxt::rnd_init(bool scan)
/* The number of columns required: */
if (pb_open_tab->ot_is_modify) {
pb_open_tab->ot_cols_req = table->read_set->MX_BIT_SIZE();
+ /* {START-STAT-HACK} previously position of start statement hack,
+ * previous comment to code below: */
/* Start a statement based transaction as soon
* as a read is done for a modify type statement!
* Previously, this was done too late!
*/
- if (!thread->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(thread, "ha_pbxt::update_row trans_register_ha all=FALSE\n");
- thread->st_stat_trans = TRUE;
- }
}
else {
pb_open_tab->ot_cols_req = ha_get_max_bit(table->read_set);
@@ -4631,7 +4603,7 @@ xtPublic int ha_pbxt::external_lock(THD
cont_(b);
}
- /* See (***) */
+ /* See {IS-UPDATE-STAT} */
self->st_is_update = FALSE;
/* Auto begin a transaction (if one is not already running): */
@@ -4660,7 +4632,7 @@ xtPublic int ha_pbxt::external_lock(THD
}
/*
- * (**) GOTCHA: trans_register_ha() is not mentioned in the documentation.
+ * {START-TRANS} GOTCHA: trans_register_ha() is not mentioned in the documentation.
* It must be called to inform MySQL that we have a transaction (see start_stmt).
*
* Here are some tests that confirm whether things are done correctly:
@@ -4698,10 +4670,46 @@ xtPublic int ha_pbxt::external_lock(THD
*/
if (!self->st_auto_commit) {
trans_register_ha(thd, TRUE, pbxt_hton);
- XT_PRINT0(self, "ha_pbxt::external_lock trans_register_ha all=TRUE\n");
+ XT_PRINT0(self, "CONN START XACT - ha_pbxt::external_lock --> trans_register_ha\n");
}
}
+ /* Start a statment transaction: */
+ /* {START-STAT-HACK} The problem that ha_commit_trans() is not
+ * called by MySQL seems to be fixed (tests confirm this).
+ * Here is the previous comment when this code was execute
+ * here {START-STAT-HACK}
+ *
+ * GOTCHA: I have a huge problem with the transaction statement.
+ * It is not ALWAYS committed (I mean ha_commit_trans() is
+ * not always called - for example in SELECT).
+ *
+ * If I call trans_register_ha() but ha_commit_trans() is not called
+ * then MySQL thinks a transaction is still running (while
+ * I have committed the auto-transaction in ha_pbxt::external_lock()).
+ *
+ * This causes all kinds of problems, like transactions
+ * are killed when they should not be.
+ *
+ * To prevent this, I only inform MySQL that a transaction
+ * has beens started when an update is performed. I have determined that
+ * ha_commit_trans() is only guarenteed to be called if an update is done.
+ * --------
+ *
+ * So, this is the correct place to start a statement transaction.
+ *
+ * Note: if trans_register_ha() is not called before ha_write_row(), then
+ * PBXT is not registered correctly as a modification transaction.
+ * (mark_trx_read_write call in ha_write_row).
+ * This leads to 2-phase commit not being called as it should when
+ * binary logging is enabled.
+ */
+ if (!pb_open_tab->ot_thread->st_stat_trans) {
+ trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
+ XT_PRINT0(pb_open_tab->ot_thread, "STAT START - ha_pbxt::external_lock --> trans_register_ha\n");
+ pb_open_tab->ot_thread->st_stat_trans = TRUE;
+ }
+
if (lock_type == F_WRLCK || self->st_xact_mode < XT_XACT_REPEATABLE_READ)
self->st_visible_time = self->st_database->db_xn_end_time;
@@ -4826,7 +4834,7 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
}
}
- /* (***) This is required at this level!
+ /* {IS-UPDATE-STAT} This is required at this level!
* No matter how often it is called, it is still the start of a
* statement. We need to make sure statements that are NOT mistaken
* for different type of statement.
@@ -4841,7 +4849,7 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
*/
self->st_is_update = FALSE;
- /* See comment (**) */
+ /* See comment {START-TRANS} */
if (!self->st_xact_data) {
self->st_xact_mode = thd_tx_isolation(thd) <= ISO_READ_COMMITTED ? XT_XACT_COMMITTED_READ : XT_XACT_REPEATABLE_READ;
self->st_ignore_fkeys = (thd_test_options(thd, OPTION_NO_FOREIGN_KEY_CHECKS)) != 0;
@@ -4858,10 +4866,17 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
}
if (!self->st_auto_commit) {
trans_register_ha(thd, TRUE, pbxt_hton);
- XT_PRINT0(self, "ha_pbxt::start_stmt trans_register_ha all=TRUE\n");
+ XT_PRINT0(self, "START CONN XACT - ha_pbxt::start_stmt --> trans_register_ha\n");
}
}
+ /* Start a statment (see {START-STAT-HACK}): */
+ if (!pb_open_tab->ot_thread->st_stat_trans) {
+ trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
+ XT_PRINT0(pb_open_tab->ot_thread, "START STAT - ha_pbxt::start_stmt --> trans_register_ha\n");
+ pb_open_tab->ot_thread->st_stat_trans = TRUE;
+ }
+
if (pb_open_tab->ot_for_update || self->st_xact_mode < XT_XACT_REPEATABLE_READ)
self->st_visible_time = self->st_database->db_xn_end_time;
=== modified file 'storage/pbxt/src/strutil_xt.cc'
--- a/storage/pbxt/src/strutil_xt.cc 2009-11-24 10:55:06 +0000
+++ b/storage/pbxt/src/strutil_xt.cc 2009-12-21 13:13:15 +0000
@@ -380,7 +380,7 @@ xtPublic void xt_int8_to_byte_size(xtInt
/* Version number must also be set in configure.in! */
xtPublic c_char *xt_get_version(void)
{
- return "1.0.09f RC";
+ return "1.0.09g RC";
}
/* Copy and URL decode! */
=== modified file 'storage/pbxt/src/table_xt.cc'
--- a/storage/pbxt/src/table_xt.cc 2009-11-25 15:40:51 +0000
+++ b/storage/pbxt/src/table_xt.cc 2009-12-22 10:33:20 +0000
@@ -1297,7 +1297,7 @@ xtPublic void xt_create_table(XTThreadPt
XTSortedListInfoRec li_undo;
#ifdef TRACE_CREATE_TABLES
- printf("CREATE %s\n", name->ps_path);
+ fprintf(stderr, "CREATE %s\n", name->ps_path);
#endif
enter_();
if (strlen(xt_last_name_of_path(name->ps_path)) > XT_TABLE_NAME_SIZE-1)
@@ -1619,7 +1619,7 @@ xtPublic void xt_drop_table(XTThreadPtr
enter_();
#ifdef TRACE_CREATE_TABLES
- printf("DROP %s\n", tab_name->ps_path);
+ fprintf(stderr, "DROP %s\n", tab_name->ps_path);
#endif
table_pool = tab_lock_table(self, tab_name, FALSE, TRUE, TRUE, &tab);
@@ -1777,7 +1777,7 @@ xtPublic void xt_check_table(XTThreadPtr
u_llong ext_data_len = 0;
#if defined(DUMP_CHECK_TABLE) || defined(CHECK_TABLE_STATS)
- printf("\nCHECK TABLE: %s\n", tab->tab_name->ps_path);
+ fprintf(stderr, "\nCHECK TABLE: %s\n", tab->tab_name->ps_path);
#endif
xt_lock_mutex(self, &tab->tab_db->db_co_ext_lock);
@@ -1787,38 +1787,38 @@ xtPublic void xt_check_table(XTThreadPtr
pushr_(xt_unlock_mutex, &tab->tab_rec_lock);
#ifdef CHECK_TABLE_STATS
- printf("Record buffer size = %lu\n", (u_long) tab->tab_dic.dic_mysql_buf_size);
- printf("Fixed length rec. len. = %lu\n", (u_long) tab->tab_dic.dic_mysql_rec_size);
- printf("Handle data record size = %lu\n", (u_long) tab->tab_dic.dic_rec_size);
- printf("Min/max header size = %d/%d\n", (int) offsetof(XTTabRecFix, rf_data), tab->tab_dic.dic_rec_fixed ? (int) offsetof(XTTabRecFix, rf_data) : (int) offsetof(XTTabRecExtDRec, re_data));
- printf("Min/avg/max record size = %llu/%llu/%llu\n", (u_llong) tab->tab_dic.dic_min_row_size, (u_llong) tab->tab_dic.dic_ave_row_size, (u_llong) tab->tab_dic.dic_max_row_size);
+ fprintf(stderr, "Record buffer size = %lu\n", (u_long) tab->tab_dic.dic_mysql_buf_size);
+ fprintf(stderr, "Fixed length rec. len. = %lu\n", (u_long) tab->tab_dic.dic_mysql_rec_size);
+ fprintf(stderr, "Handle data record size = %lu\n", (u_long) tab->tab_dic.dic_rec_size);
+ fprintf(stderr, "Min/max header size = %d/%d\n", (int) offsetof(XTTabRecFix, rf_data), tab->tab_dic.dic_rec_fixed ? (int) offsetof(XTTabRecFix, rf_data) : (int) offsetof(XTTabRecExtDRec, re_data));
+ fprintf(stderr, "Min/avg/max record size = %llu/%llu/%llu\n", (u_llong) tab->tab_dic.dic_min_row_size, (u_llong) tab->tab_dic.dic_ave_row_size, (u_llong) tab->tab_dic.dic_max_row_size);
if (tab->tab_dic.dic_def_ave_row_size)
- printf("Avg row len set for tab = %lu\n", (u_long) tab->tab_dic.dic_def_ave_row_size);
+ fprintf(stderr, "Avg row len set for tab = %lu\n", (u_long) tab->tab_dic.dic_def_ave_row_size);
else
- printf("Avg row len set for tab = not specified\n");
- printf("Rows fixed length = %s\n", tab->tab_dic.dic_rec_fixed ? "YES" : "NO");
+ fprintf(stderr, "Avg row len set for tab = not specified\n");
+ fprintf(stderr, "Rows fixed length = %s\n", tab->tab_dic.dic_rec_fixed ? "YES" : "NO");
if (tab->tab_dic.dic_tab_flags & XT_TAB_FLAGS_TEMP_TAB)
- printf("Table type = TEMP\n");
+ fprintf(stderr, "Table type = TEMP\n");
if (tab->tab_dic.dic_def_ave_row_size)
- printf("Maximum fixed size = %lu\n", (u_long) XT_TAB_MAX_FIX_REC_LENGTH_SPEC);
+ fprintf(stderr, "Maximum fixed size = %lu\n", (u_long) XT_TAB_MAX_FIX_REC_LENGTH_SPEC);
else
- printf("Maximum fixed size = %lu\n", (u_long) XT_TAB_MAX_FIX_REC_LENGTH);
- printf("Minimum variable size = %lu\n", (u_long) XT_TAB_MIN_VAR_REC_LENGTH);
- printf("Minimum auto-increment = %llu\n", (u_llong) tab->tab_dic.dic_min_auto_inc);
- printf("Number of columns = %lu\n", (u_long) tab->tab_dic.dic_no_of_cols);
- printf("Number of fixed columns = %lu\n", (u_long) tab->tab_dic.dic_fix_col_count);
- printf("Columns req. for index = %lu\n", (u_long) tab->tab_dic.dic_ind_cols_req);
+ fprintf(stderr, "Maximum fixed size = %lu\n", (u_long) XT_TAB_MAX_FIX_REC_LENGTH);
+ fprintf(stderr, "Minimum variable size = %lu\n", (u_long) XT_TAB_MIN_VAR_REC_LENGTH);
+ fprintf(stderr, "Minimum auto-increment = %llu\n", (u_llong) tab->tab_dic.dic_min_auto_inc);
+ fprintf(stderr, "Number of columns = %lu\n", (u_long) tab->tab_dic.dic_no_of_cols);
+ fprintf(stderr, "Number of fixed columns = %lu\n", (u_long) tab->tab_dic.dic_fix_col_count);
+ fprintf(stderr, "Columns req. for index = %lu\n", (u_long) tab->tab_dic.dic_ind_cols_req);
if (tab->tab_dic.dic_ind_rec_len)
- printf("Rec len req. for index = %llu\n", (u_llong) tab->tab_dic.dic_ind_rec_len);
- printf("Columns req. for blobs = %lu\n", (u_long) tab->tab_dic.dic_blob_cols_req);
- printf("Number of blob columns = %lu\n", (u_long) tab->tab_dic.dic_blob_count);
- printf("Number of indices = %lu\n", (u_long) tab->tab_dic.dic_key_count);
+ fprintf(stderr, "Rec len req. for index = %llu\n", (u_llong) tab->tab_dic.dic_ind_rec_len);
+ fprintf(stderr, "Columns req. for blobs = %lu\n", (u_long) tab->tab_dic.dic_blob_cols_req);
+ fprintf(stderr, "Number of blob columns = %lu\n", (u_long) tab->tab_dic.dic_blob_count);
+ fprintf(stderr, "Number of indices = %lu\n", (u_long) tab->tab_dic.dic_key_count);
#endif
#ifdef DUMP_CHECK_TABLE
- printf("Records:-\n");
- printf("Free list: %llu (%llu)\n", (u_llong) tab->tab_rec_free_id, (u_llong) tab->tab_rec_fnum);
- printf("EOF: %llu\n", (u_llong) tab->tab_rec_eof_id);
+ fprintf(stderr, "Records:-\n");
+ fprintf(stderr, "Free list: %llu (%llu)\n", (u_llong) tab->tab_rec_free_id, (u_llong) tab->tab_rec_fnum);
+ fprintf(stderr, "EOF: %llu\n", (u_llong) tab->tab_rec_eof_id);
#endif
rec_size = XT_REC_EXT_HEADER_SIZE;
@@ -1830,24 +1830,24 @@ xtPublic void xt_check_table(XTThreadPtr
xt_throw(self);
#ifdef DUMP_CHECK_TABLE
- printf("%-4llu ", (u_llong) rec_id);
+ fprintf(stderr, "%-4llu ", (u_llong) rec_id);
#endif
switch (rec_buf->tr_rec_type_1 & XT_TAB_STATUS_MASK) {
case XT_TAB_STATUS_FREED:
#ifdef DUMP_CHECK_TABLE
- printf("======== ");
+ fprintf(stderr, "======== ");
#endif
free_rec_count++;
break;
case XT_TAB_STATUS_DELETE:
#ifdef DUMP_CHECK_TABLE
- printf("delete ");
+ fprintf(stderr, "delete ");
#endif
delete_rec_count++;
break;
case XT_TAB_STATUS_FIXED:
#ifdef DUMP_CHECK_TABLE
- printf("record-F ");
+ fprintf(stderr, "record-F ");
#endif
alloc_rec_count++;
row_size = myxt_store_row_length(ot, (char *) ot->ot_row_rbuffer + XT_REC_FIX_HEADER_SIZE);
@@ -1859,7 +1859,7 @@ xtPublic void xt_check_table(XTThreadPtr
break;
case XT_TAB_STATUS_VARIABLE:
#ifdef DUMP_CHECK_TABLE
- printf("record-V ");
+ fprintf(stderr, "record-V ");
#endif
alloc_rec_count++;
row_size = myxt_load_row_length(ot, tab->tab_dic.dic_rec_size, ot->ot_row_rbuffer + XT_REC_FIX_HEADER_SIZE, NULL);
@@ -1871,7 +1871,7 @@ xtPublic void xt_check_table(XTThreadPtr
break;
case XT_TAB_STATUS_EXT_DLOG:
#ifdef DUMP_CHECK_TABLE
- printf("record-X ");
+ fprintf(stderr, "record-X ");
#endif
alloc_rec_count++;
ext_data_len += XT_GET_DISK_4(rec_buf->re_log_dat_siz_4);
@@ -1885,9 +1885,9 @@ xtPublic void xt_check_table(XTThreadPtr
}
#ifdef DUMP_CHECK_TABLE
if (rec_buf->tr_rec_type_1 & XT_TAB_STATUS_CLEANED_BIT)
- printf("C");
+ fprintf(stderr, "C");
else
- printf(" ");
+ fprintf(stderr, " ");
#endif
prev_rec_id = XT_GET_DISK_4(rec_buf->tr_prev_rec_id_4);
xn_id = XT_GET_DISK_4(rec_buf->tr_xact_id_4);
@@ -1895,12 +1895,12 @@ xtPublic void xt_check_table(XTThreadPtr
switch (rec_buf->tr_rec_type_1 & XT_TAB_STATUS_MASK) {
case XT_TAB_STATUS_FREED:
#ifdef DUMP_CHECK_TABLE
- printf(" prev=%-3llu (xact=%-3llu row=%lu)\n", (u_llong) prev_rec_id, (u_llong) xn_id, (u_long) row_id);
+ fprintf(stderr, " prev=%-3llu (xact=%-3llu row=%lu)\n", (u_llong) prev_rec_id, (u_llong) xn_id, (u_long) row_id);
#endif
break;
case XT_TAB_STATUS_EXT_DLOG:
#ifdef DUMP_CHECK_TABLE
- printf(" prev=%-3llu xact=%-3llu row=%lu Xlog=%lu Xoff=%llu Xsiz=%lu\n", (u_llong) prev_rec_id, (u_llong) xn_id, (u_long) row_id, (u_long) XT_GET_DISK_2(rec_buf->re_log_id_2), (u_llong) XT_GET_DISK_6(rec_buf->re_log_offs_6), (u_long) XT_GET_DISK_4(rec_buf->re_log_dat_siz_4));
+ fprintf(stderr, " prev=%-3llu xact=%-3llu row=%lu Xlog=%lu Xoff=%llu Xsiz=%lu\n", (u_llong) prev_rec_id, (u_llong) xn_id, (u_long) row_id, (u_long) XT_GET_DISK_2(rec_buf->re_log_id_2), (u_llong) XT_GET_DISK_6(rec_buf->re_log_offs_6), (u_long) XT_GET_DISK_4(rec_buf->re_log_dat_siz_4));
#endif
log_size = XT_GET_DISK_4(rec_buf->re_log_dat_siz_4);
@@ -1922,7 +1922,7 @@ xtPublic void xt_check_table(XTThreadPtr
break;
default:
#ifdef DUMP_CHECK_TABLE
- printf(" prev=%-3llu xact=%-3llu row=%lu\n", (u_llong) prev_rec_id, (u_llong) xn_id, (u_long) row_id);
+ fprintf(stderr, " prev=%-3llu xact=%-3llu row=%lu\n", (u_llong) prev_rec_id, (u_llong) xn_id, (u_long) row_id);
#endif
break;
}
@@ -1931,16 +1931,16 @@ xtPublic void xt_check_table(XTThreadPtr
#ifdef CHECK_TABLE_STATS
if (!tab->tab_dic.dic_rec_fixed)
- printf("Extendend data length = %llu\n", ext_data_len);
+ fprintf(stderr, "Extendend data length = %llu\n", ext_data_len);
if (alloc_rec_count) {
- printf("Minumum comp. rec. len. = %llu\n", (u_llong) min_comp_rec_len);
- printf("Average comp. rec. len. = %llu\n", (u_llong) ((double) alloc_rec_bytes / (double) alloc_rec_count + (double) 0.5));
- printf("Maximum comp. rec. len. = %llu\n", (u_llong) max_comp_rec_len);
- }
- printf("Free record count = %llu\n", (u_llong) free_rec_count);
- printf("Deleted record count = %llu\n", (u_llong) delete_rec_count);
- printf("Allocated record count = %llu\n", (u_llong) alloc_rec_count);
+ fprintf(stderr, "Minumum comp. rec. len. = %llu\n", (u_llong) min_comp_rec_len);
+ fprintf(stderr, "Average comp. rec. len. = %llu\n", (u_llong) ((double) alloc_rec_bytes / (double) alloc_rec_count + (double) 0.5));
+ fprintf(stderr, "Maximum comp. rec. len. = %llu\n", (u_llong) max_comp_rec_len);
+ }
+ fprintf(stderr, "Free record count = %llu\n", (u_llong) free_rec_count);
+ fprintf(stderr, "Deleted record count = %llu\n", (u_llong) delete_rec_count);
+ fprintf(stderr, "Allocated record count = %llu\n", (u_llong) alloc_rec_count);
#endif
if (tab->tab_rec_fnum != free_rec_count)
xt_logf(XT_INFO, "Table %s: incorrect number of free blocks, %llu, should be: %llu\n", tab->tab_name, (u_llong) free_rec_count, (u_llong) tab->tab_rec_fnum);
@@ -1978,9 +1978,9 @@ xtPublic void xt_check_table(XTThreadPtr
pushr_(xt_unlock_mutex, &tab->tab_row_lock);
#ifdef DUMP_CHECK_TABLE
- printf("Rows:-\n");
- printf("Free list: %llu (%llu)\n", (u_llong) tab->tab_row_free_id, (u_llong) tab->tab_row_fnum);
- printf("EOF: %llu\n", (u_llong) tab->tab_row_eof_id);
+ fprintf(stderr, "Rows:-\n");
+ fprintf(stderr, "Free list: %llu (%llu)\n", (u_llong) tab->tab_row_free_id, (u_llong) tab->tab_row_fnum);
+ fprintf(stderr, "EOF: %llu\n", (u_llong) tab->tab_row_eof_id);
#endif
rec_id = 1;
@@ -1988,13 +1988,13 @@ xtPublic void xt_check_table(XTThreadPtr
if (!tab->tab_rows.xt_tc_read_4(ot->ot_row_file, rec_id, &ref_id, self))
xt_throw(self);
#ifdef DUMP_CHECK_TABLE
- printf("%-3llu ", (u_llong) rec_id);
+ fprintf(stderr, "%-3llu ", (u_llong) rec_id);
#endif
#ifdef DUMP_CHECK_TABLE
if (ref_id == 0)
- printf("====== 0\n");
+ fprintf(stderr, "====== 0\n");
else
- printf("in use %llu\n", (u_llong) ref_id);
+ fprintf(stderr, "in use %llu\n", (u_llong) ref_id);
#endif
rec_id++;
}
@@ -2026,7 +2026,7 @@ xtPublic void xt_rename_table(XTThreadPt
memset(&dic, 0, sizeof(dic));
#ifdef TRACE_CREATE_TABLES
- printf("RENAME %s --> %s\n", old_name->ps_path, new_name->ps_path);
+ fprintf(stderr, "RENAME %s --> %s\n", old_name->ps_path, new_name->ps_path);
#endif
if (strlen(xt_last_name_of_path(new_name->ps_path)) > XT_TABLE_NAME_SIZE-1)
xt_throw_taberr(XT_CONTEXT, XT_ERR_NAME_TOO_LONG, new_name);
@@ -2221,7 +2221,7 @@ xtPublic xtBool xt_flush_record_row(XTOp
xt_tab_store_header(ot, &rec_head);
#ifdef TRACE_FLUSH
- printf("FLUSH rec/row %d %s\n", (int) tab->tab_bytes_to_flush, tab->tab_name->ps_path);
+ fprintf(stderr, "FLUSH rec/row %d %s\n", (int) tab->tab_bytes_to_flush, tab->tab_name->ps_path);
fflush(stdout);
#endif
/* Write the table header: */
@@ -2276,7 +2276,7 @@ xtPublic xtBool xt_flush_record_row(XTOp
xt_unlock_mutex_ns(&cp->cp_state_lock);
#ifdef TRACE_FLUSH
- printf("FLUSH --end-- %s\n", tab->tab_name->ps_path);
+ fprintf(stderr, "FLUSH --end-- %s\n", tab->tab_name->ps_path);
fflush(stdout);
#endif
xt_unlock_mutex_ns(&tab->tab_rec_flush_lock);
=== modified file 'storage/pbxt/src/thread_xt.cc'
--- a/storage/pbxt/src/thread_xt.cc 2009-11-24 10:55:06 +0000
+++ b/storage/pbxt/src/thread_xt.cc 2009-12-22 10:33:20 +0000
@@ -96,7 +96,7 @@ xtPublic xtBool xt_init_logging(void)
{
int err;
- log_file = stdout;
+ log_file = stderr;
log_level = XT_LOG_TRACE;
err = xt_p_mutex_init_with_autoname(&log_mutex, NULL);
if (err) {
=== modified file 'storage/pbxt/src/trace_xt.cc'
--- a/storage/pbxt/src/trace_xt.cc 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/trace_xt.cc 2009-12-22 10:33:20 +0000
@@ -109,10 +109,10 @@ xtPublic void xt_print_trace(void)
xt_lock_mutex_ns(&trace_mutex);
if (trace_log_end > trace_log_offset+1) {
trace_log_buffer[trace_log_end] = 0;
- printf("%s", trace_log_buffer + trace_log_offset + 1);
+ fprintf(stderr, "%s", trace_log_buffer + trace_log_offset + 1);
}
trace_log_buffer[trace_log_offset] = 0;
- printf("%s", trace_log_buffer);
+ fprintf(stderr, "%s", trace_log_buffer);
trace_log_offset = 0;
trace_log_end = 0;
xt_unlock_mutex_ns(&trace_mutex);
@@ -379,9 +379,9 @@ xtPublic void xt_dump_conn_tracking(void
ptr = conn_info;
for (int i=0; i<XT_TRACK_MAX_CONNS; i++) {
if (ptr->ci_curr_xact_id || ptr->ci_prev_xact_id) {
- printf("%3d curr=%d prev=%d prev-time=%ld\n", (int) ptr->cu_t_id, (int) ptr->ci_curr_xact_id, (int) ptr->ci_prev_xact_id, (long) ptr->ci_prev_xact_time);
+ fprintf(stderr, "%3d curr=%d prev=%d prev-time=%ld\n", (int) ptr->cu_t_id, (int) ptr->ci_curr_xact_id, (int) ptr->ci_prev_xact_id, (long) ptr->ci_prev_xact_time);
if (i+1<XT_TRACK_MAX_CONNS) {
- printf(" diff=%d\n", (int) (ptr+1)->ci_curr_xact_id - (int) ptr->ci_curr_xact_id);
+ fprintf(stderr, " diff=%d\n", (int) (ptr+1)->ci_curr_xact_id - (int) ptr->ci_curr_xact_id);
}
}
ptr++;
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2786)
by knielsenï¼ knielsen-hq.org 05 Jan '10
by knielsenï¼ knielsen-hq.org 05 Jan '10
05 Jan '10
#At lp:maria
2786 knielsen(a)knielsen-hq.org 2010-01-05 [merge]
Automatic merge.
removed:
mysql-test/r/have_big5.require
mysql-test/r/have_cp1250_ch.require
mysql-test/r/have_cp1251.require
mysql-test/r/have_cp866.require
mysql-test/r/have_cp932.require
mysql-test/r/have_eucjpms.require
mysql-test/r/have_euckr.require
mysql-test/r/have_gb2312.require
mysql-test/r/have_gbk.require
mysql-test/r/have_koi8r.require
mysql-test/r/have_latin2_ch.require
mysql-test/r/have_sjis.require
mysql-test/r/have_tis620.require
mysql-test/r/have_ucs2.require
mysql-test/r/have_ujis.require
mysql-test/r/have_utf8.require
added:
mysql-test/include/have_collation.inc
mysql-test/r/create-uca.result
mysql-test/r/innodb_utf8.result
mysql-test/t/create-uca.test
mysql-test/t/innodb_utf8.test
modified:
client/mysqltest.cc
mysql-test/include/have_big5.inc
mysql-test/include/have_cp1250_ch.inc
mysql-test/include/have_cp1251.inc
mysql-test/include/have_cp866.inc
mysql-test/include/have_cp932.inc
mysql-test/include/have_eucjpms.inc
mysql-test/include/have_euckr.inc
mysql-test/include/have_gb2312.inc
mysql-test/include/have_gbk.inc
mysql-test/include/have_koi8r.inc
mysql-test/include/have_latin2_ch.inc
mysql-test/include/have_sjis.inc
mysql-test/include/have_tis620.inc
mysql-test/include/have_ucs2.inc
mysql-test/include/have_ujis.inc
mysql-test/include/have_utf8.inc
mysql-test/mysql-test-run.pl
mysql-test/r/create.result
mysql-test/r/ctype_utf8.result
mysql-test/r/innodb.result
mysql-test/suite/rpl/t/rpl_ignore_table.test
mysql-test/t/create.test
mysql-test/t/ctype_utf8.test
mysql-test/t/ddl_i18n_koi8r.test
mysql-test/t/ddl_i18n_utf8.test
mysql-test/t/fulltext.test
mysql-test/t/fulltext2.test
mysql-test/t/innodb.test
mysql-test/t/query_cache_ps_no_prot.test
mysql-test/t/query_cache_ps_ps_prot.test
mysys/my_uuid.c
scripts/mysqlbug.sh
sql/log.cc
storage/ndb/plug.in
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-12-03 11:19:05 +0000
+++ b/client/mysqltest.cc 2009-12-27 13:54:41 +0000
@@ -1267,6 +1267,7 @@ void abort_not_supported_test(const char
DBUG_ENTER("abort_not_supported_test");
/* Print include filestack */
+ fflush(stdout);
fprintf(stderr, "The test '%s' is not supported by this installation\n",
file_stack->file_name);
fprintf(stderr, "Detected in file %s at line %d\n",
@@ -8098,7 +8099,10 @@ int main(int argc, char **argv)
abort_flag= 1;
break;
case Q_SKIP:
- abort_not_supported_test("%s", command->first_argument);
+ /* Eval the query, thus replacing all environment variables */
+ dynstr_set(&ds_res, 0);
+ do_eval(&ds_res, command->first_argument, command->end, FALSE);
+ abort_not_supported_test("%s",ds_res.str);
break;
case Q_RESULT:
=== modified file 'mysql-test/include/have_big5.inc'
--- a/mysql-test/include/have_big5.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_big5.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_big5.require
-disable_query_log;
-show collation like 'big5_chinese_ci';
-enable_query_log;
+let collation=big5_chinese_ci;
+--source include/have_collation.inc
=== added file 'mysql-test/include/have_collation.inc'
--- a/mysql-test/include/have_collation.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/have_collation.inc 2009-12-27 13:54:41 +0000
@@ -0,0 +1,3 @@
+if (!`SELECT count(*) AS 'true' FROM information_schema.collations WHERE collation_name LIKE '$collation'`) {
+ skip Test needs character set '$collation';
+}
=== modified file 'mysql-test/include/have_cp1250_ch.inc'
--- a/mysql-test/include/have_cp1250_ch.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_cp1250_ch.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_cp1250_ch.require
-disable_query_log;
-show collation like 'cp1250_czech_cs';
-enable_query_log;
+let collation=cp1250_czech_cs;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_cp1251.inc'
--- a/mysql-test/include/have_cp1251.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_cp1251.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_cp1251.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'cp1251_general_ci';
-
---enable_query_log
+let collation=cp1251_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_cp866.inc'
--- a/mysql-test/include/have_cp866.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_cp866.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_cp866.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'cp866_general_ci';
-
---enable_query_log
+let collation=cp866_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_cp932.inc'
--- a/mysql-test/include/have_cp932.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_cp932.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_cp932.require
-disable_query_log;
-show collation like 'cp932_japanese_ci';
-enable_query_log;
+let collation=cp932_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_eucjpms.inc'
--- a/mysql-test/include/have_eucjpms.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_eucjpms.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_eucjpms.require
-disable_query_log;
-show collation like 'eucjpms_japanese_ci';
-enable_query_log;
+let collation=eucjpms_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_euckr.inc'
--- a/mysql-test/include/have_euckr.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_euckr.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_euckr.require
-disable_query_log;
-show collation like 'euckr_korean_ci';
-enable_query_log;
+let collation=euckr_korean_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_gb2312.inc'
--- a/mysql-test/include/have_gb2312.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_gb2312.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_gb2312.require
-disable_query_log;
-show collation like 'gb2312_chinese_ci';
-enable_query_log;
+let collation=gb2312_chinese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_gbk.inc'
--- a/mysql-test/include/have_gbk.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_gbk.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_gbk.require
-disable_query_log;
-show collation like 'gbk_chinese_ci';
-enable_query_log;
+let collation=gbk_chinese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_koi8r.inc'
--- a/mysql-test/include/have_koi8r.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_koi8r.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_koi8r.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'koi8r_general_ci';
-
---enable_query_log
+let collation=koi8r_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_latin2_ch.inc'
--- a/mysql-test/include/have_latin2_ch.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_latin2_ch.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_latin2_ch.require
-disable_query_log;
-show collation like 'latin2_czech_cs';
-enable_query_log;
+let collation=latin2_czech_cs;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_sjis.inc'
--- a/mysql-test/include/have_sjis.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_sjis.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_sjis.require
-disable_query_log;
-show collation like 'sjis_japanese_ci';
-enable_query_log;
+let collation=sjis_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_tis620.inc'
--- a/mysql-test/include/have_tis620.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_tis620.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_tis620.require
-disable_query_log;
-show collation like 'tis620_thai_ci';
-enable_query_log;
+let collation=tis620_thai_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_ucs2.inc'
--- a/mysql-test/include/have_ucs2.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_ucs2.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_ucs2.require
-disable_query_log;
-show collation like 'ucs2_general_ci';
-enable_query_log;
+let collation=ucs2_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_ujis.inc'
--- a/mysql-test/include/have_ujis.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_ujis.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_ujis.require
-disable_query_log;
-show collation like 'ujis_japanese_ci';
-enable_query_log;
+let collation=ujis_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_utf8.inc'
--- a/mysql-test/include/have_utf8.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_utf8.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_utf8.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'utf8_general_ci';
-
---enable_query_log
+let collation=utf8_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2010-01-04 11:33:07 +0000
+++ b/mysql-test/mysql-test-run.pl 2010-01-05 14:28:34 +0000
@@ -126,7 +126,7 @@ my $path_config_file; # The ge
# executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
-my $DEFAULT_SUITES= "main,binlog,federated,rpl,innodb,maria,parts";
+my $DEFAULT_SUITES= "main,binlog,federated,rpl,maria,parts";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
=== added file 'mysql-test/r/create-uca.result'
--- a/mysql-test/r/create-uca.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/create-uca.result 2009-12-27 13:54:41 +0000
@@ -0,0 +1,31 @@
+drop table if exists t1,t2;
+CREATE TABLE t1(
+c1 INT DEFAULT 12 COMMENT 'column1',
+c2 INT NULL COMMENT 'column2',
+c3 INT NOT NULL COMMENT 'column3',
+c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
+c6 VARCHAR(255))
+COLLATE latin1_bin;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) DEFAULT '12' COMMENT 'column1',
+ `c2` int(11) DEFAULT NULL COMMENT 'column2',
+ `c3` int(11) NOT NULL COMMENT 'column3',
+ `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
+ `c6` varchar(255) COLLATE latin1_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin
+CREATE TABLE t2 AS SELECT * FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` int(11) DEFAULT '12' COMMENT 'column1',
+ `c2` int(11) DEFAULT NULL COMMENT 'column2',
+ `c3` int(11) NOT NULL COMMENT 'column3',
+ `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
+ `c6` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
=== modified file 'mysql-test/r/create.result'
--- a/mysql-test/r/create.result 2009-12-03 11:19:05 +0000
+++ b/mysql-test/r/create.result 2009-12-27 13:54:41 +0000
@@ -1793,52 +1793,6 @@ t1 CREATE TABLE `t1` (
drop table t1;
# --
-# -- Bug#21380: DEFAULT definition not always transfered by CREATE
-# -- TABLE/SELECT to the new table.
-# --
-
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-
-CREATE TABLE t1(
-c1 INT DEFAULT 12 COMMENT 'column1',
-c2 INT NULL COMMENT 'column2',
-c3 INT NOT NULL COMMENT 'column3',
-c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
-c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
-c6 VARCHAR(255))
-COLLATE latin1_bin;
-
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` int(11) DEFAULT '12' COMMENT 'column1',
- `c2` int(11) DEFAULT NULL COMMENT 'column2',
- `c3` int(11) NOT NULL COMMENT 'column3',
- `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
- `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
- `c6` varchar(255) COLLATE latin1_bin DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin
-
-CREATE TABLE t2 AS SELECT * FROM t1;
-
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `c1` int(11) DEFAULT '12' COMMENT 'column1',
- `c2` int(11) DEFAULT NULL COMMENT 'column2',
- `c3` int(11) NOT NULL COMMENT 'column3',
- `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
- `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
- `c6` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-
-DROP TABLE t2;
-DROP TABLE t1;
-
-# -- End of test case for Bug#21380.
-
-# --
# -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields
# --
=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result 2009-01-26 21:19:13 +0000
+++ b/mysql-test/r/ctype_utf8.result 2010-01-04 12:35:54 +0000
@@ -1,3 +1,5 @@
+drop table if exists t1,t2,t3,t4;
+drop database if exists mysqltest;
drop table if exists t1,t2;
set names utf8;
select left(_utf8 0xD0B0D0B1D0B2,1);
=== removed file 'mysql-test/r/have_big5.require'
--- a/mysql-test/r/have_big5.require 2003-12-24 12:59:48 +0000
+++ b/mysql-test/r/have_big5.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-big5_chinese_ci big5 1 Yes Yes 1
=== removed file 'mysql-test/r/have_cp1250_ch.require'
--- a/mysql-test/r/have_cp1250_ch.require 2005-03-03 10:15:37 +0000
+++ b/mysql-test/r/have_cp1250_ch.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp1250_czech_cs cp1250 34 Yes 2
=== removed file 'mysql-test/r/have_cp1251.require'
--- a/mysql-test/r/have_cp1251.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_cp1251.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp1251_general_ci cp1251 51 Yes 0
=== removed file 'mysql-test/r/have_cp866.require'
--- a/mysql-test/r/have_cp866.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_cp866.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp866_general_ci cp866 36 Yes 0
=== removed file 'mysql-test/r/have_cp932.require'
--- a/mysql-test/r/have_cp932.require 2005-02-01 10:37:51 +0000
+++ b/mysql-test/r/have_cp932.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp932_japanese_ci cp932 95 Yes Yes 1
=== removed file 'mysql-test/r/have_eucjpms.require'
--- a/mysql-test/r/have_eucjpms.require 2005-02-01 10:37:51 +0000
+++ b/mysql-test/r/have_eucjpms.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-eucjpms_japanese_ci eucjpms 97 Yes Yes 1
=== removed file 'mysql-test/r/have_euckr.require'
--- a/mysql-test/r/have_euckr.require 2005-12-09 12:37:58 +0000
+++ b/mysql-test/r/have_euckr.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-euckr_korean_ci euckr 19 Yes Yes 1
=== removed file 'mysql-test/r/have_gb2312.require'
--- a/mysql-test/r/have_gb2312.require 2005-12-09 12:37:58 +0000
+++ b/mysql-test/r/have_gb2312.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-gb2312_chinese_ci gb2312 24 Yes Yes 1
=== removed file 'mysql-test/r/have_gbk.require'
--- a/mysql-test/r/have_gbk.require 2005-07-22 16:06:02 +0000
+++ b/mysql-test/r/have_gbk.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-gbk_chinese_ci gbk 28 Yes Yes 1
=== removed file 'mysql-test/r/have_koi8r.require'
--- a/mysql-test/r/have_koi8r.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_koi8r.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-koi8r_general_ci koi8r 7 Yes 0
=== removed file 'mysql-test/r/have_latin2_ch.require'
--- a/mysql-test/r/have_latin2_ch.require 2006-03-20 12:28:25 +0000
+++ b/mysql-test/r/have_latin2_ch.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-latin2_czech_cs latin2 2 Yes 4
=== removed file 'mysql-test/r/have_sjis.require'
--- a/mysql-test/r/have_sjis.require 2004-03-25 10:29:56 +0000
+++ b/mysql-test/r/have_sjis.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-sjis_japanese_ci sjis 13 Yes Yes 1
=== removed file 'mysql-test/r/have_tis620.require'
--- a/mysql-test/r/have_tis620.require 2003-12-25 16:11:01 +0000
+++ b/mysql-test/r/have_tis620.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-tis620_thai_ci tis620 18 Yes Yes 4
=== removed file 'mysql-test/r/have_ucs2.require'
--- a/mysql-test/r/have_ucs2.require 2003-06-02 12:19:06 +0000
+++ b/mysql-test/r/have_ucs2.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-ucs2_general_ci ucs2 35 Yes Yes 1
=== removed file 'mysql-test/r/have_ujis.require'
--- a/mysql-test/r/have_ujis.require 2003-09-19 10:18:19 +0000
+++ b/mysql-test/r/have_ujis.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-ujis_japanese_ci ujis 12 Yes Yes 1
=== removed file 'mysql-test/r/have_utf8.require'
--- a/mysql-test/r/have_utf8.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_utf8.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-utf8_general_ci utf8 33 Yes Yes 1
=== modified file 'mysql-test/r/innodb.result'
--- a/mysql-test/r/innodb.result 2009-11-13 21:26:08 +0000
+++ b/mysql-test/r/innodb.result 2009-12-27 13:54:41 +0000
@@ -3160,15 +3160,6 @@ ALTER TABLE t2 MODIFY a INT NOT NULL;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
DELETE FROM t1;
DROP TABLE t2,t1;
-CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
-ENGINE=InnoDB;
-INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
-DELETE FROM t1;
-INSERT INTO t1 VALUES ('DDD');
-SELECT * FROM t1;
-a
-DDD
-DROP TABLE t1;
CREATE TABLE t1 (id int PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
AUTO_INCREMENT=42;
INSERT INTO t1 VALUES (0),(347),(0);
=== added file 'mysql-test/r/innodb_utf8.result'
--- a/mysql-test/r/innodb_utf8.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/innodb_utf8.result 2009-12-27 13:54:41 +0000
@@ -0,0 +1,10 @@
+drop table if exists t1;
+CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
+DELETE FROM t1;
+INSERT INTO t1 VALUES ('DDD');
+SELECT * FROM t1;
+a
+DDD
+DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl/t/rpl_ignore_table.test'
--- a/mysql-test/suite/rpl/t/rpl_ignore_table.test 2008-11-13 19:19:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test 2009-12-27 13:54:41 +0000
@@ -1,4 +1,6 @@
source include/master-slave.inc;
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
#
# BUG#16487
=== added file 'mysql-test/t/create-uca.test'
--- a/mysql-test/t/create-uca.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/create-uca.test 2009-12-27 13:54:41 +0000
@@ -0,0 +1,26 @@
+# Prerequisites
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
+# Initial cleanup
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+#
+# Bug#21380: DEFAULT definition not always transfered by CREATE
+# TABLE/SELECT to the new table.
+#
+
+CREATE TABLE t1(
+ c1 INT DEFAULT 12 COMMENT 'column1',
+ c2 INT NULL COMMENT 'column2',
+ c3 INT NOT NULL COMMENT 'column3',
+ c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
+ c6 VARCHAR(255))
+ COLLATE latin1_bin;
+SHOW CREATE TABLE t1;
+CREATE TABLE t2 AS SELECT * FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
=== modified file 'mysql-test/t/create.test'
--- a/mysql-test/t/create.test 2009-12-03 11:19:05 +0000
+++ b/mysql-test/t/create.test 2009-12-27 13:54:41 +0000
@@ -1400,52 +1400,6 @@ drop table t1;
--echo
--echo # --
---echo # -- Bug#21380: DEFAULT definition not always transfered by CREATE
---echo # -- TABLE/SELECT to the new table.
---echo # --
---echo
-
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
-
---echo
-
-CREATE TABLE t1(
- c1 INT DEFAULT 12 COMMENT 'column1',
- c2 INT NULL COMMENT 'column2',
- c3 INT NOT NULL COMMENT 'column3',
- c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
- c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
- c6 VARCHAR(255))
- COLLATE latin1_bin;
-
---echo
-
-SHOW CREATE TABLE t1;
-
---echo
-
-CREATE TABLE t2 AS SELECT * FROM t1;
-
---echo
-
-SHOW CREATE TABLE t2;
-
---echo
-
-DROP TABLE t2;
-DROP TABLE t1;
-
---echo
---echo # -- End of test case for Bug#21380.
-
-###########################################################################
-
---echo
---echo # --
--echo # -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields
--echo # --
--echo
=== modified file 'mysql-test/t/ctype_utf8.test'
--- a/mysql-test/t/ctype_utf8.test 2009-01-26 21:19:13 +0000
+++ b/mysql-test/t/ctype_utf8.test 2009-12-27 13:54:41 +0000
@@ -2,6 +2,15 @@
# Tests with the utf8 character set
#
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
+--disable_warnings
+drop table if exists t1,t2,t3,t4;
+drop database if exists mysqltest;
+--enable_warnings
+
+
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
=== modified file 'mysql-test/t/ddl_i18n_koi8r.test'
--- a/mysql-test/t/ddl_i18n_koi8r.test 2009-05-15 10:15:56 +0000
+++ b/mysql-test/t/ddl_i18n_koi8r.test 2009-12-27 13:54:41 +0000
@@ -36,6 +36,8 @@
--source include/have_cp866.inc
--source include/have_cp1251.inc
--source include/have_koi8r.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
###########################################################################
=== modified file 'mysql-test/t/ddl_i18n_utf8.test'
--- a/mysql-test/t/ddl_i18n_utf8.test 2009-05-15 10:15:56 +0000
+++ b/mysql-test/t/ddl_i18n_utf8.test 2009-12-27 13:54:41 +0000
@@ -36,6 +36,8 @@
--source include/have_cp866.inc
--source include/have_cp1251.inc
--source include/have_koi8r.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
###########################################################################
=== modified file 'mysql-test/t/fulltext.test'
--- a/mysql-test/t/fulltext.test 2009-09-07 20:50:10 +0000
+++ b/mysql-test/t/fulltext.test 2009-12-27 13:54:41 +0000
@@ -2,6 +2,9 @@
# Test of fulltext index
#
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
--disable_warnings
drop table if exists t1,t2,t3;
--enable_warnings
=== modified file 'mysql-test/t/fulltext2.test'
--- a/mysql-test/t/fulltext2.test 2009-10-28 07:52:34 +0000
+++ b/mysql-test/t/fulltext2.test 2009-12-27 13:54:41 +0000
@@ -2,6 +2,9 @@
# test of new fulltext search features
#
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
#
# two-level tree
#
=== modified file 'mysql-test/t/innodb.test'
--- a/mysql-test/t/innodb.test 2009-11-13 21:26:08 +0000
+++ b/mysql-test/t/innodb.test 2009-12-27 13:54:41 +0000
@@ -2353,18 +2353,6 @@ DELETE FROM t1;
DROP TABLE t2,t1;
#
-# Bug #26835: table corruption after delete+insert
-#
-
-CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
-ENGINE=InnoDB;
-INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
-DELETE FROM t1;
-INSERT INTO t1 VALUES ('DDD');
-SELECT * FROM t1;
-DROP TABLE t1;
-
-#
# Bug #23313 (AUTO_INCREMENT=# not reported back for InnoDB tables)
# Bug #21404 (AUTO_INCREMENT value reset when Adding FKEY (or ALTER?))
#
=== added file 'mysql-test/t/innodb_utf8.test'
--- a/mysql-test/t/innodb_utf8.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/innodb_utf8.test 2009-12-27 13:54:41 +0000
@@ -0,0 +1,24 @@
+#
+# Tests for innodb that requires not default character sets
+#
+
+--source include/have_innodb.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
+# Setup
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+#
+# Bug #26835: table corruption after delete+insert
+#
+
+CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
+DELETE FROM t1;
+INSERT INTO t1 VALUES ('DDD');
+SELECT * FROM t1;
+DROP TABLE t1;
=== modified file 'mysql-test/t/query_cache_ps_no_prot.test'
--- a/mysql-test/t/query_cache_ps_no_prot.test 2007-05-24 20:13:49 +0000
+++ b/mysql-test/t/query_cache_ps_no_prot.test 2009-12-27 13:54:41 +0000
@@ -11,8 +11,9 @@
# We cannot run on embedded server because we use multiple sessions.
--source include/not_embedded.inc
-
--source include/have_query_cache.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
# The file with expected results fits only to a run without
# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
=== modified file 'mysql-test/t/query_cache_ps_ps_prot.test'
--- a/mysql-test/t/query_cache_ps_ps_prot.test 2007-05-24 20:13:49 +0000
+++ b/mysql-test/t/query_cache_ps_ps_prot.test 2009-12-27 13:54:41 +0000
@@ -11,8 +11,9 @@
# We cannot run on embedded server because we use multiple sessions.
--source include/not_embedded.inc
-
--source include/have_query_cache.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
# The file with expected results fits only to a run with "--ps-protocol".
if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0
=== modified file 'mysys/my_uuid.c'
--- a/mysys/my_uuid.c 2009-02-01 12:02:29 +0000
+++ b/mysys/my_uuid.c 2010-01-04 18:31:26 +0000
@@ -108,7 +108,7 @@ void my_uuid_init(ulong seed1, ulong see
*/
/* purecov: begin inspected */
my_rnd_init(&uuid_rand, (ulong) (seed2+ now/2), (ulong) (now+rand()));
- for (i=0; i < sizeof(mac); i++)
+ for (i=0; i < array_elements(uuid_suffix) -2 ; i++)
mac[i]= (uchar)(my_rnd(&uuid_rand)*255);
/* purecov: end */
}
=== modified file 'scripts/mysqlbug.sh'
--- a/scripts/mysqlbug.sh 2007-10-19 17:06:30 +0000
+++ b/scripts/mysqlbug.sh 2009-12-27 13:54:41 +0000
@@ -21,7 +21,7 @@ echo "Finding system information for a M
VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@"
COMPILATION_COMMENT="@COMPILATION_COMMENT@"
-BUGmysql="mysql(a)lists.mysql.com"
+BUGmysql="maria-developers(a)lists.launchpad.net"
# This is set by configure
COMP_CALL_INFO="CC='@SAVE_CC@' CFLAGS='@SAVE_CFLAGS@' CXX='@SAVE_CXX@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'"
COMP_RUN_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'"
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2009-12-03 11:19:05 +0000
+++ b/sql/log.cc 2010-01-04 18:25:29 +0000
@@ -5154,8 +5154,8 @@ int TC_LOG_MMAP::open(const char *opt_na
pthread_mutex_init(&pg->lock, MY_MUTEX_INIT_FAST);
pthread_cond_init (&pg->cond, 0);
pg->start=(my_xid *)(data + i*tc_log_page_size);
- pg->end=(my_xid *)(pg->start + tc_log_page_size);
pg->size=pg->free=tc_log_page_size/sizeof(my_xid);
+ pg->end=pg->start + pg->size;
}
pages[0].size=pages[0].free=
(tc_log_page_size-TC_LOG_HEADER_SIZE)/sizeof(my_xid);
=== modified file 'storage/ndb/plug.in'
--- a/storage/ndb/plug.in 2006-08-19 04:19:19 +0000
+++ b/storage/ndb/plug.in 2009-12-27 13:54:41 +0000
@@ -1,5 +1,5 @@
MYSQL_STORAGE_ENGINE(ndbcluster, ndbcluster, [Cluster Storage Engine],
- [High Availability Clustered tables], [max])
+ [High Availability Clustered tables],)
MYSQL_PLUGIN_DIRECTORY(ndbcluster,[storage/ndb])
MYSQL_PLUGIN_STATIC(ndbcluster, [[\$(ndbcluster_libs) \$(ndbcluster_system_libs) \$(NDB_SCI_LIBS)]])
MYSQL_PLUGIN_ACTIONS(ndbcluster,[MYSQL_SETUP_NDBCLUSTER])
1
0

[Maria-developers] bzr commit into Mariadb 5.2, with Maria 2.0:maria/5.2 branch (monty:2736)
by Michael Widenius 04 Jan '10
by Michael Widenius 04 Jan '10
04 Jan '10
#At lp:maria/5.2 based on revid:monty@askmonty.org-20100104175442-305w0x6tg4opi7rb
2736 Michael Widenius 2010-01-04 [merge]
Merge bug fixes from 5.1
modified:
mysys/my_uuid.c
sql/log.cc
=== modified file 'mysys/my_uuid.c'
--- a/mysys/my_uuid.c 2009-02-01 12:02:29 +0000
+++ b/mysys/my_uuid.c 2010-01-04 18:31:26 +0000
@@ -108,7 +108,7 @@ void my_uuid_init(ulong seed1, ulong see
*/
/* purecov: begin inspected */
my_rnd_init(&uuid_rand, (ulong) (seed2+ now/2), (ulong) (now+rand()));
- for (i=0; i < sizeof(mac); i++)
+ for (i=0; i < array_elements(uuid_suffix) -2 ; i++)
mac[i]= (uchar)(my_rnd(&uuid_rand)*255);
/* purecov: end */
}
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2010-01-04 17:54:42 +0000
+++ b/sql/log.cc 2010-01-04 21:53:10 +0000
@@ -5192,8 +5192,8 @@ int TC_LOG_MMAP::open(const char *opt_na
pthread_mutex_init(&pg->lock, MY_MUTEX_INIT_FAST);
pthread_cond_init (&pg->cond, 0);
pg->start=(my_xid *)(data + i*tc_log_page_size);
- pg->end=(my_xid *)(pg->start + tc_log_page_size);
pg->size=pg->free=tc_log_page_size/sizeof(my_xid);
+ pg->end=pg->start + pg->size;
}
pages[0].size=pages[0].free=
(tc_log_page_size-TC_LOG_HEADER_SIZE)/sizeof(my_xid);
1
0

[Maria-developers] [Branch ~maria-captains/maria/5.1] Rev 2789: Fixed bug in my_uuid() that caused failures on hpux and ia64
by noreplyï¼ launchpad.net 04 Jan '10
by noreplyï¼ launchpad.net 04 Jan '10
04 Jan '10
------------------------------------------------------------
revno: 2789
committer: Michael Widenius <monty(a)askmonty.org>
branch nick: maria-5.1
timestamp: Mon 2010-01-04 20:31:26 +0200
message:
Fixed bug in my_uuid() that caused failures on hpux and ia64
modified:
mysys/my_uuid.c
--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1
Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2789)
by Michael Widenius 04 Jan '10
by Michael Widenius 04 Jan '10
04 Jan '10
#At lp:maria based on revid:monty@askmonty.org-20100104182529-kf2o1tisifggs2vg
2789 Michael Widenius 2010-01-04
Fixed bug in my_uuid() that caused failures on hpux and ia64
modified:
mysys/my_uuid.c
=== modified file 'mysys/my_uuid.c'
--- a/mysys/my_uuid.c 2009-02-01 12:02:29 +0000
+++ b/mysys/my_uuid.c 2010-01-04 18:31:26 +0000
@@ -108,7 +108,7 @@ void my_uuid_init(ulong seed1, ulong see
*/
/* purecov: begin inspected */
my_rnd_init(&uuid_rand, (ulong) (seed2+ now/2), (ulong) (now+rand()));
- for (i=0; i < sizeof(mac); i++)
+ for (i=0; i < array_elements(uuid_suffix) -2 ; i++)
mac[i]= (uchar)(my_rnd(&uuid_rand)*255);
/* purecov: end */
}
1
0

[Maria-developers] [Branch ~maria-captains/maria/5.1] Rev 2788: Fixed bug in tc.log recovery code that caused crash_commit_before to sometimes crash.
by noreplyï¼ launchpad.net 04 Jan '10
by noreplyï¼ launchpad.net 04 Jan '10
04 Jan '10
------------------------------------------------------------
revno: 2788
committer: Michael Widenius <monty(a)askmonty.org>
branch nick: maria-5.1
timestamp: Mon 2010-01-04 20:25:29 +0200
message:
Fixed bug in tc.log recovery code that caused crash_commit_before to sometimes crash.
modified:
sql/log.cc
--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1
Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.
1
0

[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2788)
by Michael Widenius 04 Jan '10
by Michael Widenius 04 Jan '10
04 Jan '10
#At lp:maria based on revid:monty@askmonty.org-20100104123554-wt8n85bd7zh0a47c
2788 Michael Widenius 2010-01-04
Fixed bug in tc.log recovery code that caused crash_commit_before to sometimes crash.
modified:
sql/log.cc
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2009-12-03 11:19:05 +0000
+++ b/sql/log.cc 2010-01-04 18:25:29 +0000
@@ -5154,8 +5154,8 @@ int TC_LOG_MMAP::open(const char *opt_na
pthread_mutex_init(&pg->lock, MY_MUTEX_INIT_FAST);
pthread_cond_init (&pg->cond, 0);
pg->start=(my_xid *)(data + i*tc_log_page_size);
- pg->end=(my_xid *)(pg->start + tc_log_page_size);
pg->size=pg->free=tc_log_page_size/sizeof(my_xid);
+ pg->end=pg->start + pg->size;
}
pages[0].size=pages[0].free=
(tc_log_page_size-TC_LOG_HEADER_SIZE)/sizeof(my_xid);
1
0

[Maria-developers] bzr commit into Mariadb 5.2, with Maria 2.0:maria/5.2 branch (monty:2735)
by Michael Widenius 04 Jan '10
by Michael Widenius 04 Jan '10
04 Jan '10
#At lp:maria/5.2 based on revid:sanja@askmonty.org-20091209091419-1vf3iqokr4opvp4k
2735 Michael Widenius 2010-01-04 [merge]
Merge with 5.1
removed:
mysql-test/r/have_big5.require
mysql-test/r/have_cp1250_ch.require
mysql-test/r/have_cp1251.require
mysql-test/r/have_cp866.require
mysql-test/r/have_cp932.require
mysql-test/r/have_eucjpms.require
mysql-test/r/have_euckr.require
mysql-test/r/have_gb2312.require
mysql-test/r/have_gbk.require
mysql-test/r/have_koi8r.require
mysql-test/r/have_latin2_ch.require
mysql-test/r/have_sjis.require
mysql-test/r/have_tis620.require
mysql-test/r/have_ucs2.require
mysql-test/r/have_ujis.require
mysql-test/r/have_utf8.require
added:
mysql-test/include/have_collation.inc
mysql-test/r/create-uca.result
mysql-test/r/innodb_utf8.result
mysql-test/t/create-uca.test
mysql-test/t/innodb_utf8.test
storage/pbxt/src/backup_xt.cc
storage/pbxt/src/backup_xt.h
modified:
.bzrignore
BUILD/FINISH.sh
BUILD/SETUP.sh
client/mysql.cc
client/mysqlcheck.c
client/mysqlslap.c
client/mysqltest.cc
dbug/dbug.c
extra/yassl/taocrypt/include/block.hpp
mysql-test/include/have_big5.inc
mysql-test/include/have_cp1250_ch.inc
mysql-test/include/have_cp1251.inc
mysql-test/include/have_cp866.inc
mysql-test/include/have_cp932.inc
mysql-test/include/have_eucjpms.inc
mysql-test/include/have_euckr.inc
mysql-test/include/have_gb2312.inc
mysql-test/include/have_gbk.inc
mysql-test/include/have_koi8r.inc
mysql-test/include/have_latin2_ch.inc
mysql-test/include/have_sjis.inc
mysql-test/include/have_tis620.inc
mysql-test/include/have_ucs2.inc
mysql-test/include/have_ujis.inc
mysql-test/include/have_utf8.inc
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_report.pm
mysql-test/lib/v1/mysql-test-run.pl
mysql-test/mysql-test-run.pl
mysql-test/r/create.result
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_utf8.result
mysql-test/r/innodb.result
mysql-test/r/warnings.result
mysql-test/suite/federated/disabled.def
mysql-test/suite/federated/federated_server.result
mysql-test/suite/federated/federated_server.test
mysql-test/suite/funcs_1/r/innodb_func_view.result
mysql-test/suite/funcs_1/r/memory_func_view.result
mysql-test/suite/funcs_1/r/myisam_func_view.result
mysql-test/suite/rpl/t/rpl_ignore_table.test
mysql-test/t/create.test
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_utf8.test
mysql-test/t/ddl_i18n_koi8r.test
mysql-test/t/ddl_i18n_utf8.test
mysql-test/t/fulltext.test
mysql-test/t/fulltext2.test
mysql-test/t/innodb.test
mysql-test/t/query_cache_ps_no_prot.test
mysql-test/t/query_cache_ps_ps_prot.test
mysql-test/t/warnings.test
plugin/fulltext/plugin_example.c
scripts/mysqlbug.sh
sql-common/client.c
sql/handler.cc
sql/my_decimal.cc
sql/mysqld.cc
sql/share/errmsg.txt
sql/slave.cc
sql/sql_base.cc
sql/sql_class.cc
sql/sql_insert.cc
storage/federatedx/ha_federatedx.cc
storage/ndb/plug.in
storage/pbxt/ChangeLog
storage/pbxt/src/Makefile.am
storage/pbxt/src/cache_xt.cc
storage/pbxt/src/cache_xt.h
storage/pbxt/src/database_xt.cc
storage/pbxt/src/database_xt.h
storage/pbxt/src/datadic_xt.cc
storage/pbxt/src/datalog_xt.cc
storage/pbxt/src/discover_xt.cc
storage/pbxt/src/filesys_xt.cc
storage/pbxt/src/filesys_xt.h
storage/pbxt/src/ha_pbxt.cc
storage/pbxt/src/ha_pbxt.h
storage/pbxt/src/ha_xtsys.h
storage/pbxt/src/heap_xt.cc
storage/pbxt/src/index_xt.cc
storage/pbxt/src/lock_xt.cc
storage/pbxt/src/locklist_xt.h
storage/pbxt/src/memory_xt.cc
storage/pbxt/src/myxt_xt.cc
storage/pbxt/src/myxt_xt.h
storage/pbxt/src/pbms.h
storage/pbxt/src/pbms_enabled.cc
storage/pbxt/src/pbms_enabled.h
storage/pbxt/src/pthread_xt.cc
storage/pbxt/src/restart_xt.cc
storage/pbxt/src/restart_xt.h
storage/pbxt/src/strutil_xt.cc
storage/pbxt/src/systab_xt.cc
storage/pbxt/src/tabcache_xt.cc
storage/pbxt/src/tabcache_xt.h
storage/pbxt/src/table_xt.cc
storage/pbxt/src/table_xt.h
storage/pbxt/src/thread_xt.cc
storage/pbxt/src/thread_xt.h
storage/pbxt/src/util_xt.cc
storage/pbxt/src/util_xt.h
storage/pbxt/src/xaction_xt.cc
storage/pbxt/src/xaction_xt.h
storage/pbxt/src/xactlog_xt.cc
storage/pbxt/src/xactlog_xt.h
storage/pbxt/src/xt_config.h
storage/pbxt/src/xt_defs.h
storage/pbxt/src/xt_errno.h
strings/ctype-ucs2.c
unittest/mysys/Makefile.am
=== modified file '.bzrignore'
--- a/.bzrignore 2009-11-30 21:37:27 +0000
+++ b/.bzrignore 2010-01-04 17:54:42 +0000
@@ -1924,3 +1924,7 @@ libmysqld/opt_table_elimination.cc
libmysqld/ha_federatedx.cc
tmp
libmysqld/debug_sync.cc
+client/rpl_filter.cc
+client/rpl_filter.h
+client/sql_list.cc
+client/sql_list.h
=== modified file 'BUILD/FINISH.sh'
--- a/BUILD/FINISH.sh 2009-10-27 13:20:34 +0000
+++ b/BUILD/FINISH.sh 2009-12-06 17:34:54 +0000
@@ -1,6 +1,6 @@
-cflags="$c_warnings $extra_flags"
-cxxflags="$cxx_warnings $base_cxxflags $extra_flags"
-extra_configs="$extra_configs $local_infile_configs"
+cflags="$c_warnings $extra_flags $EXTRA_FLAGS $EXTRA_CFLAGS"
+cxxflags="$cxx_warnings $base_cxxflags $extra_flags $EXTRA_FLAGS $EXTRA_CXXFLAGS"
+extra_configs="$extra_configs $local_infile_configs $EXTRA_CONFIGS"
configure="./configure $base_configs $extra_configs"
commands="\
=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh 2009-10-29 00:04:56 +0000
+++ b/BUILD/SETUP.sh 2009-12-06 17:34:54 +0000
@@ -34,6 +34,14 @@ parse_options()
full_debug="=full";;
--warning-mode=*)
warning_mode=`get_key_value "$1"`;;
+ --extra-flags=*)
+ EXTRA_FLAGS=`get_key_value "$1"`;;
+ --extra-cflags=*)
+ EXTRA_CFLAGS=`get_key_value "$1"`;;
+ --extra-cxxflags=*)
+ EXTRA_CXXFLAGS=`get_key_value "$1"`;;
+ --extra-configs=*)
+ EXTRA_CONFIGS=`get_key_value "$1"`;;
-c | --just-configure)
just_configure=1;;
-n | --just-print | --print)
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2009-11-30 21:37:27 +0000
+++ b/client/mysql.cc 2009-12-03 11:34:11 +0000
@@ -1280,7 +1280,6 @@ sig_handler handle_sigint(int sig)
MYSQL *kill_mysql= NULL;
/* terminate if no query being executed, or we already tried interrupting */
- /* terminate if no query being executed, or we already tried interrupting */
if (!executing_query || (interrupted_query == 2))
{
tee_fprintf(stdout, "Ctrl-C -- exit!\n");
@@ -1295,6 +1294,7 @@ sig_handler handle_sigint(int sig)
goto err;
}
+ /* First time try to kill the query, second time the connection */
interrupted_query++;
/* mysqld < 5 does not understand KILL QUERY, skip to KILL CONNECTION */
@@ -1305,10 +1305,13 @@ sig_handler handle_sigint(int sig)
sprintf(kill_buffer, "KILL %s%lu",
(interrupted_query == 1) ? "QUERY " : "",
mysql_thread_id(&mysql));
- tee_fprintf(stdout, "Ctrl-C -- sending \"%s\" to server ...\n", kill_buffer);
+ if (verbose)
+ tee_fprintf(stdout, "Ctrl-C -- sending \"%s\" to server ...\n",
+ kill_buffer);
mysql_real_query(kill_mysql, kill_buffer, (uint) strlen(kill_buffer));
mysql_close(kill_mysql);
- tee_fprintf(stdout, "Ctrl-C -- query aborted.\n");
+ tee_fprintf(stdout, "Ctrl-C -- query killed. Continuing normally.\n");
+ interrupted_query= 0;
return;
@@ -1321,7 +1324,6 @@ err:
handler called mysql_end().
*/
mysql_thread_end();
- return;
#else
mysql_end(sig);
#endif
@@ -2881,13 +2883,8 @@ com_help(String *buffer __attribute__((u
return com_server_help(buffer,line,help_arg);
}
- put_info("\nFor information about MySQL products and services, visit:\n"
- " http://www.mysql.com/\n"
- "For developer information, including the MySQL Reference Manual, "
- "visit:\n"
- " http://dev.mysql.com/\n"
- "To buy MySQL Enterprise support, training, or other products, visit:\n"
- " https://shop.mysql.com/\n", INFO_INFO);
+ put_info("\nGeneral information about MariaDB can be found at\n"
+ "http://askmonty.org/wiki/index.php/Manual:Contents\n", INFO_INFO);
put_info("List of all MySQL commands:", INFO_INFO);
if (!named_cmds)
put_info("Note that all text commands must be first on line and end with ';'",INFO_INFO);
=== modified file 'client/mysqlcheck.c'
--- a/client/mysqlcheck.c 2009-09-28 06:24:19 +0000
+++ b/client/mysqlcheck.c 2009-12-03 11:19:05 +0000
@@ -857,7 +857,8 @@ int main(int argc, char **argv)
if (!opt_write_binlog)
{
- if (disable_binlog()) {
+ if (disable_binlog())
+ {
first_error= 1;
goto end;
}
=== modified file 'client/mysqlslap.c'
--- a/client/mysqlslap.c 2009-11-30 21:37:27 +0000
+++ b/client/mysqlslap.c 2009-12-03 11:34:11 +0000
@@ -472,11 +472,10 @@ void concurrency_loop(MYSQL *mysql, uint
if (commit_rate)
run_query(mysql, "SET AUTOCOMMIT=0", strlen("SET AUTOCOMMIT=0"));
- if (pre_system)
- if ((sysret= system(pre_system)) != 0)
- fprintf(stderr,
- "Warning: Execution of pre_system option returned %d.\n",
- sysret);
+ if (pre_system && (sysret= system(pre_system)) != 0)
+ fprintf(stderr,
+ "Warning: Execution of pre_system option returned %d.\n",
+ sysret);
/*
Pre statements are always run after all other logic so they can
@@ -490,11 +489,10 @@ void concurrency_loop(MYSQL *mysql, uint
if (post_statements)
run_statements(mysql, post_statements);
- if (post_system)
- if ((sysret= system(post_system)) != 0)
- fprintf(stderr,
- "Warning: Execution of post_system option returned %d.\n",
- sysret);
+ if (post_system && (sysret= system(post_system)) != 0)
+ fprintf(stderr,
+ "Warning: Execution of post_system option returned %d.\n",
+ sysret);
/* We are finished with this run */
if (auto_generate_sql_autoincrement || auto_generate_sql_guid_primary)
drop_primary_key_list();
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-11-16 20:49:51 +0000
+++ b/client/mysqltest.cc 2009-12-27 13:54:41 +0000
@@ -1267,6 +1267,7 @@ void abort_not_supported_test(const char
DBUG_ENTER("abort_not_supported_test");
/* Print include filestack */
+ fflush(stdout);
fprintf(stderr, "The test '%s' is not supported by this installation\n",
file_stack->file_name);
fprintf(stderr, "Detected in file %s at line %d\n",
@@ -3497,9 +3498,10 @@ void do_diff_files(struct st_command *co
if ((error= compare_files(ds_filename.str, ds_filename2.str)) &&
match_expected_error(command, error, NULL) < 0)
{
- /* Compare of the two files failed, append them to output
- so the failure can be analyzed, but only if it was not
- expected to fail.
+ /*
+ Compare of the two files failed, append them to output
+ so the failure can be analyzed, but only if it was not
+ expected to fail.
*/
show_diff(&ds_res, ds_filename.str, ds_filename2.str);
log_file.write(&ds_res);
@@ -5013,7 +5015,8 @@ void do_connect(struct st_command *comma
con_options= ds_options.str;
while (*con_options)
{
- char* end;
+ size_t length;
+ char *end;
/* Step past any spaces in beginning of option*/
while (*con_options && my_isspace(charset_info, *con_options))
con_options++;
@@ -5021,13 +5024,14 @@ void do_connect(struct st_command *comma
end= con_options;
while (*end && !my_isspace(charset_info, *end))
end++;
- if (!strncmp(con_options, "SSL", 3))
+ length= (size_t) (end - con_options);
+ if (length == 3 && !strncmp(con_options, "SSL", 3))
con_ssl= 1;
- else if (!strncmp(con_options, "COMPRESS", 8))
+ else if (length == 8 && !strncmp(con_options, "COMPRESS", 8))
con_compress= 1;
- else if (!strncmp(con_options, "PIPE", 4))
+ else if (length == 4 && !strncmp(con_options, "PIPE", 4))
con_pipe= 1;
- else if (!strncmp(con_options, "SHM", 3))
+ else if (length == 3 && !strncmp(con_options, "SHM", 3))
con_shm= 1;
else
die("Illegal option to connect: %.*s",
@@ -5096,14 +5100,13 @@ void do_connect(struct st_command *comma
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str);
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
}
- else if(shared_memory_base_name)
+ else if (shared_memory_base_name)
{
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
- shared_memory_base_name);
+ shared_memory_base_name);
}
#endif
-
/* Use default db name */
if (ds_database.length == 0)
dynstr_set(&ds_database, opt_db);
@@ -6879,10 +6882,8 @@ void run_query_stmt(MYSQL *mysql, struct
MYSQL_STMT *stmt;
DYNAMIC_STRING ds_prepare_warnings;
DYNAMIC_STRING ds_execute_warnings;
- ulonglong affected_rows;
DBUG_ENTER("run_query_stmt");
DBUG_PRINT("query", ("'%-.60s'", query));
- LINT_INIT(affected_rows);
/*
Init a new stmt if it's not already one created for this connection
@@ -6981,6 +6982,9 @@ void run_query_stmt(MYSQL *mysql, struct
handle_no_error(command);
if (!disable_result_log)
{
+ ulonglong affected_rows;
+ LINT_INIT(affected_rows);
+
/*
Not all statements creates a result set. If there is one we can
now create another normal result set that contains the meta
@@ -7026,39 +7030,33 @@ void run_query_stmt(MYSQL *mysql, struct
Need to grab affected rows information before getting
warnings here
*/
- {
- ulonglong affected_rows;
- LINT_INIT(affected_rows);
+ if (!disable_info)
+ affected_rows= mysql_affected_rows(mysql);
- if (!disable_info)
- affected_rows= mysql_affected_rows(mysql);
+ if (!disable_warnings)
+ {
+ /* Get the warnings from execute */
- if (!disable_warnings)
+ /* Append warnings to ds - if there are any */
+ if (append_warnings(&ds_execute_warnings, mysql) ||
+ ds_execute_warnings.length ||
+ ds_prepare_warnings.length ||
+ ds_warnings->length)
{
- /* Get the warnings from execute */
-
- /* Append warnings to ds - if there are any */
- if (append_warnings(&ds_execute_warnings, mysql) ||
- ds_execute_warnings.length ||
- ds_prepare_warnings.length ||
- ds_warnings->length)
- {
- dynstr_append_mem(ds, "Warnings:\n", 10);
- if (ds_warnings->length)
- dynstr_append_mem(ds, ds_warnings->str,
- ds_warnings->length);
- if (ds_prepare_warnings.length)
- dynstr_append_mem(ds, ds_prepare_warnings.str,
- ds_prepare_warnings.length);
- if (ds_execute_warnings.length)
- dynstr_append_mem(ds, ds_execute_warnings.str,
- ds_execute_warnings.length);
- }
+ dynstr_append_mem(ds, "Warnings:\n", 10);
+ if (ds_warnings->length)
+ dynstr_append_mem(ds, ds_warnings->str,
+ ds_warnings->length);
+ if (ds_prepare_warnings.length)
+ dynstr_append_mem(ds, ds_prepare_warnings.str,
+ ds_prepare_warnings.length);
+ if (ds_execute_warnings.length)
+ dynstr_append_mem(ds, ds_execute_warnings.str,
+ ds_execute_warnings.length);
}
-
- if (!disable_info)
- append_info(ds, affected_rows, mysql_info(mysql));
}
+ if (!disable_info)
+ append_info(ds, affected_rows, mysql_info(mysql));
}
end:
@@ -7235,7 +7233,6 @@ void run_query(struct st_connection *cn,
}
dynstr_free(&query_str);
-
}
if (sp_protocol_enabled &&
@@ -7662,6 +7659,7 @@ int main(int argc, char **argv)
my_bool q_send_flag= 0, abort_flag= 0;
uint command_executed= 0, last_command_executed= 0;
char save_file[FN_REFLEN];
+ bool empty_result= FALSE;
MY_INIT(argv[0]);
save_file[0]= 0;
@@ -7819,6 +7817,7 @@ int main(int argc, char **argv)
verbose_msg("Start processing test commands from '%s' ...", cur_file->file_name);
while (!read_command(&command) && !abort_flag)
{
+ my_bool ok_to_do;
int current_line_inc = 1, processed = 0;
if (command->type == Q_UNKNOWN || command->type == Q_COMMENT_WITH_COMMAND)
get_command_type(command);
@@ -7831,7 +7830,7 @@ int main(int argc, char **argv)
command->type= Q_COMMENT;
}
- my_bool ok_to_do= cur_block->ok;
+ ok_to_do= cur_block->ok;
/*
Some commands need to be "done" the first time if they may get
re-iterated over in a true context. This can only happen if there's
@@ -8100,7 +8099,10 @@ int main(int argc, char **argv)
abort_flag= 1;
break;
case Q_SKIP:
- abort_not_supported_test("%s", command->first_argument);
+ /* Eval the query, thus replacing all environment variables */
+ dynstr_set(&ds_res, 0);
+ do_eval(&ds_res, command->first_argument, command->end, FALSE);
+ abort_not_supported_test("%s",ds_res.str);
break;
case Q_RESULT:
@@ -8167,8 +8169,6 @@ int main(int argc, char **argv)
if (parsing_disabled)
die("Test ended with parsing disabled");
- my_bool empty_result= FALSE;
-
/*
The whole test has been executed _sucessfully_.
Time to compare result or save it to record file.
=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c 2009-09-07 20:50:10 +0000
+++ b/dbug/dbug.c 2009-12-07 00:52:40 +0000
@@ -497,12 +497,18 @@ int DbugParse(CODE_STATE *cs, const char
const char *end;
int rel, f_used=0;
struct settings *stack;
+ int org_cs_locked;
stack= cs->stack;
+ if (!(org_cs_locked= cs->locked))
+ {
+ cs->locked= 1;
+ pthread_mutex_lock(&THR_LOCK_dbug);
+ }
+
if (control[0] == '-' && control[1] == '#')
control+=2;
-
rel= control[0] == '+' || control[0] == '-';
if ((!rel || (!stack->out_file && !stack->next)))
{
@@ -550,9 +556,11 @@ int DbugParse(CODE_STATE *cs, const char
while (control < end)
{
int c, sign= (*control == '+') ? 1 : (*control == '-') ? -1 : 0;
- if (sign) control++;
+ if (sign)
+ control++;
c= *control++;
- if (*control == ',') control++;
+ if (*control == ',')
+ control++;
/* XXX when adding new cases here, don't forget _db_explain_ ! */
switch (c) {
case 'd':
@@ -570,7 +578,7 @@ int DbugParse(CODE_STATE *cs, const char
{
if (DEBUGGING)
stack->keywords= ListDel(stack->keywords, control, end);
- break;
+ break;
}
stack->keywords= ListAdd(stack->keywords, control, end);
stack->flags |= DEBUG_ON;
@@ -718,8 +726,13 @@ int DbugParse(CODE_STATE *cs, const char
control=end+1;
end= DbugStrTok(control);
}
- return !rel || f_used;
-}
+ if (!org_cs_locked)
+ {
+ pthread_mutex_unlock(&THR_LOCK_dbug);
+ cs->locked= 0;
+ }
+ return !rel || f_used;}
+
#define framep_trace_flag(cs, frp) (frp ? \
frp->level & TRACE_ON : \
@@ -1340,11 +1353,11 @@ void _db_doprnt_(const char *format,...)
va_start(args,format);
+ if (!cs->locked)
+ pthread_mutex_lock(&THR_LOCK_dbug);
if (_db_keyword_(cs, cs->u_keyword, 0))
{
int save_errno=errno;
- if (!cs->locked)
- pthread_mutex_lock(&THR_LOCK_dbug);
DoPrefix(cs, cs->u_line);
if (TRACING)
Indent(cs, cs->level + 1);
@@ -1356,6 +1369,9 @@ void _db_doprnt_(const char *format,...)
DbugFlush(cs);
errno=save_errno;
}
+ else if (!cs->locked)
+ pthread_mutex_unlock(&THR_LOCK_dbug);
+
va_end(args);
}
@@ -1386,10 +1402,10 @@ void _db_dump_(uint _line_, const char *
CODE_STATE *cs;
get_code_state_or_return;
+ if (!cs->locked)
+ pthread_mutex_lock(&THR_LOCK_dbug);
if (_db_keyword_(cs, keyword, 0))
{
- if (!cs->locked)
- pthread_mutex_lock(&THR_LOCK_dbug);
DoPrefix(cs, _line_);
if (TRACING)
{
@@ -1420,6 +1436,8 @@ void _db_dump_(uint _line_, const char *
(void) fputc('\n',cs->stack->out_file);
DbugFlush(cs);
}
+ else if (!cs->locked)
+ pthread_mutex_unlock(&THR_LOCK_dbug);
}
@@ -2105,7 +2123,8 @@ static void DBUGCloseFile(CODE_STATE *cs
{
if (fp != stderr && fp != stdout && fclose(fp) == EOF)
{
- pthread_mutex_lock(&THR_LOCK_dbug);
+ if (!cs->locked)
+ pthread_mutex_lock(&THR_LOCK_dbug);
(void) fprintf(cs->stack->out_file, ERR_CLOSE, cs->process);
perror("");
DbugFlush(cs);
=== modified file 'extra/yassl/taocrypt/include/block.hpp'
--- a/extra/yassl/taocrypt/include/block.hpp 2009-02-10 22:47:54 +0000
+++ b/extra/yassl/taocrypt/include/block.hpp 2009-12-06 17:34:54 +0000
@@ -167,7 +167,8 @@ public:
void CleanNew(word32 newSize)
{
New(newSize);
- memset(buffer_, 0, sz_ * sizeof(T));
+ if (sz_ > 0)
+ memset(buffer_, 0, sz_ * sizeof(T));
}
void New(word32 newSize)
=== modified file 'mysql-test/include/have_big5.inc'
--- a/mysql-test/include/have_big5.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_big5.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_big5.require
-disable_query_log;
-show collation like 'big5_chinese_ci';
-enable_query_log;
+let collation=big5_chinese_ci;
+--source include/have_collation.inc
=== added file 'mysql-test/include/have_collation.inc'
--- a/mysql-test/include/have_collation.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/have_collation.inc 2009-12-27 13:54:41 +0000
@@ -0,0 +1,3 @@
+if (!`SELECT count(*) AS 'true' FROM information_schema.collations WHERE collation_name LIKE '$collation'`) {
+ skip Test needs character set '$collation';
+}
=== modified file 'mysql-test/include/have_cp1250_ch.inc'
--- a/mysql-test/include/have_cp1250_ch.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_cp1250_ch.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_cp1250_ch.require
-disable_query_log;
-show collation like 'cp1250_czech_cs';
-enable_query_log;
+let collation=cp1250_czech_cs;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_cp1251.inc'
--- a/mysql-test/include/have_cp1251.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_cp1251.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_cp1251.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'cp1251_general_ci';
-
---enable_query_log
+let collation=cp1251_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_cp866.inc'
--- a/mysql-test/include/have_cp866.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_cp866.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_cp866.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'cp866_general_ci';
-
---enable_query_log
+let collation=cp866_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_cp932.inc'
--- a/mysql-test/include/have_cp932.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_cp932.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_cp932.require
-disable_query_log;
-show collation like 'cp932_japanese_ci';
-enable_query_log;
+let collation=cp932_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_eucjpms.inc'
--- a/mysql-test/include/have_eucjpms.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_eucjpms.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_eucjpms.require
-disable_query_log;
-show collation like 'eucjpms_japanese_ci';
-enable_query_log;
+let collation=eucjpms_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_euckr.inc'
--- a/mysql-test/include/have_euckr.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_euckr.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_euckr.require
-disable_query_log;
-show collation like 'euckr_korean_ci';
-enable_query_log;
+let collation=euckr_korean_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_gb2312.inc'
--- a/mysql-test/include/have_gb2312.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_gb2312.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_gb2312.require
-disable_query_log;
-show collation like 'gb2312_chinese_ci';
-enable_query_log;
+let collation=gb2312_chinese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_gbk.inc'
--- a/mysql-test/include/have_gbk.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_gbk.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_gbk.require
-disable_query_log;
-show collation like 'gbk_chinese_ci';
-enable_query_log;
+let collation=gbk_chinese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_koi8r.inc'
--- a/mysql-test/include/have_koi8r.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_koi8r.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_koi8r.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'koi8r_general_ci';
-
---enable_query_log
+let collation=koi8r_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_latin2_ch.inc'
--- a/mysql-test/include/have_latin2_ch.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_latin2_ch.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_latin2_ch.require
-disable_query_log;
-show collation like 'latin2_czech_cs';
-enable_query_log;
+let collation=latin2_czech_cs;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_sjis.inc'
--- a/mysql-test/include/have_sjis.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_sjis.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_sjis.require
-disable_query_log;
-show collation like 'sjis_japanese_ci';
-enable_query_log;
+let collation=sjis_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_tis620.inc'
--- a/mysql-test/include/have_tis620.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_tis620.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_tis620.require
-disable_query_log;
-show collation like 'tis620_thai_ci';
-enable_query_log;
+let collation=tis620_thai_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_ucs2.inc'
--- a/mysql-test/include/have_ucs2.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_ucs2.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_ucs2.require
-disable_query_log;
-show collation like 'ucs2_general_ci';
-enable_query_log;
+let collation=ucs2_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_ujis.inc'
--- a/mysql-test/include/have_ujis.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_ujis.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_ujis.require
-disable_query_log;
-show collation like 'ujis_japanese_ci';
-enable_query_log;
+let collation=ujis_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_utf8.inc'
--- a/mysql-test/include/have_utf8.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_utf8.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_utf8.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'utf8_general_ci';
-
---enable_query_log
+let collation=utf8_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm 2009-11-16 20:49:51 +0000
+++ b/mysql-test/lib/mtr_cases.pm 2009-12-06 17:34:54 +0000
@@ -101,7 +101,6 @@ sub init_pattern {
sub collect_test_cases ($$) {
my $suites= shift; # Semicolon separated list of test suites
- my %found_suites;
my $opt_cases= shift;
my $cases= []; # Array of hash(one hash for each testcase)
@@ -115,7 +114,6 @@ sub collect_test_cases ($$) {
["ha_innodb_plugin.dll", "ha_innodb_plugin.so",
"ha_innodb_plugin.sl"],
NOT_REQUIRED);
-
$do_innodb_plugin= ($::mysql_version_id >= 50100 &&
!(IS_WINDOWS && $::opt_embedded_server) &&
$lib_innodb_plugin);
@@ -123,7 +121,6 @@ sub collect_test_cases ($$) {
foreach my $suite (split(",", $suites))
{
push(@$cases, collect_one_suite($suite, $opt_cases));
- $found_suites{$suite}= 1;
last if $some_test_found;
}
@@ -136,12 +133,6 @@ sub collect_test_cases ($$) {
{
my $found= 0;
my ($sname, $tname, $extension)= split_testname($test_name_spec);
- if (defined($sname) && !defined($found_suites{$sname}))
- {
- $found_suites{$sname}= 1;
- push(@$cases, collect_one_suite($sname));
- }
-
foreach my $test ( @$cases )
{
# test->{name} is always in suite.name format
@@ -247,7 +238,7 @@ sub split_testname {
}
-sub collect_one_suite($)
+sub collect_one_suite
{
my $suite= shift; # Test suite name
my $opt_cases= shift;
@@ -767,7 +758,6 @@ sub process_opts_file {
}
}
-
##############################################################################
#
# Collect information about a single test case
=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm 2009-11-16 20:49:51 +0000
+++ b/mysql-test/lib/mtr_report.pm 2009-12-03 11:19:05 +0000
@@ -388,7 +388,7 @@ MSG
}
elsif (@$extra_warnings)
{
- mtr_error("There were errors/warnings in server logs after running test cases.");
+ mtr_error("There where errors/warnings in server logs after running test cases.");
}
elsif ($fail)
{
=== modified file 'mysql-test/lib/v1/mysql-test-run.pl'
--- a/mysql-test/lib/v1/mysql-test-run.pl 2009-02-15 10:58:34 +0000
+++ b/mysql-test/lib/v1/mysql-test-run.pl 2009-12-09 16:43:00 +0000
@@ -178,6 +178,7 @@ our @opt_extra_mysqltest_opt;
our $opt_compress;
our $opt_ssl;
+our $opt_skip_ssl;
our $opt_ssl_supported;
our $opt_ps_protocol;
our $opt_sp_protocol;
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2009-11-30 21:37:27 +0000
+++ b/mysql-test/mysql-test-run.pl 2009-12-21 16:26:36 +0000
@@ -126,7 +126,7 @@ my $path_config_file; # The ge
# executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
-my $DEFAULT_SUITES= "main,binlog,federated,rpl,innodb,maria,parts";
+my $DEFAULT_SUITES= "main,binlog,federated,rpl,maria,parts";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
@@ -201,10 +201,10 @@ my $opt_mark_progress;
my $opt_sleep;
-my $opt_testcase_timeout= 15; # minutes
-my $opt_suite_timeout = 300; # minutes
-my $opt_shutdown_timeout= 10; # seconds
-my $opt_start_timeout = 180; # seconds
+my $opt_testcase_timeout= 15; # 15 minutes
+my $opt_suite_timeout = 360; # 6 hours
+my $opt_shutdown_timeout= 10; # 10 seconds
+my $opt_start_timeout = 180; # 180 seconds
sub testcase_timeout { return $opt_testcase_timeout * 60; };
sub suite_timeout { return $opt_suite_timeout * 60; };
@@ -1319,6 +1319,8 @@ sub command_line_setup {
{
# Indicate that we are using debugger
$glob_debugger= 1;
+ $opt_testcase_timeout= 60*60*24; # Don't abort debugging with timeout
+ $opt_suite_timeout= $opt_testcase_timeout;
$opt_retry= 1;
$opt_retry_failure= 1;
@@ -2151,7 +2153,6 @@ sub environment_setup {
# Create an environment variable to make it possible
# to detect that valgrind is being used from test cases
$ENV{'VALGRIND_TEST'}= $opt_valgrind;
-
}
@@ -2908,8 +2909,8 @@ sub mysql_install_db {
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
my $path_sql= my_find_file($install_basedir,
- ["mysql", "sql/share", "share/mysql",
- "share/mariadb", "share", "scripts"],
+ ["mysql", "sql/share", "share/mariadb",
+ "share/mysql", "share", "scripts"],
"mysql_system_tables.sql",
NOT_REQUIRED);
@@ -3861,7 +3862,7 @@ sub extract_server_log ($$) {
my ($error_log, $tname) = @_;
# Open the servers .err log file and read all lines
- # belonging to current tets into @lines
+ # belonging to current test into @lines
my $Ferr = IO::File->new($error_log)
or mtr_error("Could not open file '$error_log' for reading: $!");
@@ -5682,12 +5683,15 @@ Misc options
servers to exit before finishing the process
fast Run as fast as possible, dont't wait for servers
to shutdown etc.
- parallel=N Run tests in N parallel threads (default=1)
+ parallel=N Run tests in N parallel threads (default 1)
Use parallel=auto for auto-setting of N
repeat=N Run each test N number of times
- retry=N Retry tests that fail N times, limit number of failures
- to $opt_retry_failure
- retry-failure=N Limit number of retries for a failed test
+ retry=N Retry tests that fail up to N times (default $opt_retry).
+ Retries are also limited by the maximum number of
+ failures before stopping, set with the --retry-failure
+ option
+ retry-failure=N When using the --retry option to retry failed tests,
+ stop when N failures have occured (default $opt_retry_failure)
reorder Reorder tests to get fewer server restarts
help Get this help text
=== added file 'mysql-test/r/create-uca.result'
--- a/mysql-test/r/create-uca.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/create-uca.result 2009-12-27 13:54:41 +0000
@@ -0,0 +1,31 @@
+drop table if exists t1,t2;
+CREATE TABLE t1(
+c1 INT DEFAULT 12 COMMENT 'column1',
+c2 INT NULL COMMENT 'column2',
+c3 INT NOT NULL COMMENT 'column3',
+c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
+c6 VARCHAR(255))
+COLLATE latin1_bin;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) DEFAULT '12' COMMENT 'column1',
+ `c2` int(11) DEFAULT NULL COMMENT 'column2',
+ `c3` int(11) NOT NULL COMMENT 'column3',
+ `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
+ `c6` varchar(255) COLLATE latin1_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin
+CREATE TABLE t2 AS SELECT * FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` int(11) DEFAULT '12' COMMENT 'column1',
+ `c2` int(11) DEFAULT NULL COMMENT 'column2',
+ `c3` int(11) NOT NULL COMMENT 'column3',
+ `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
+ `c6` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
=== modified file 'mysql-test/r/create.result'
--- a/mysql-test/r/create.result 2009-11-16 20:49:51 +0000
+++ b/mysql-test/r/create.result 2009-12-27 13:54:41 +0000
@@ -1793,52 +1793,6 @@ t1 CREATE TABLE `t1` (
drop table t1;
# --
-# -- Bug#21380: DEFAULT definition not always transfered by CREATE
-# -- TABLE/SELECT to the new table.
-# --
-
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-
-CREATE TABLE t1(
-c1 INT DEFAULT 12 COMMENT 'column1',
-c2 INT NULL COMMENT 'column2',
-c3 INT NOT NULL COMMENT 'column3',
-c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
-c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
-c6 VARCHAR(255))
-COLLATE latin1_bin;
-
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` int(11) DEFAULT '12' COMMENT 'column1',
- `c2` int(11) DEFAULT NULL COMMENT 'column2',
- `c3` int(11) NOT NULL COMMENT 'column3',
- `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
- `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
- `c6` varchar(255) COLLATE latin1_bin DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin
-
-CREATE TABLE t2 AS SELECT * FROM t1;
-
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `c1` int(11) DEFAULT '12' COMMENT 'column1',
- `c2` int(11) DEFAULT NULL COMMENT 'column2',
- `c3` int(11) NOT NULL COMMENT 'column3',
- `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
- `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
- `c6` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-
-DROP TABLE t2;
-DROP TABLE t1;
-
-# -- End of test case for Bug#21380.
-
-# --
# -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields
# --
=== modified file 'mysql-test/r/ctype_ucs.result'
--- a/mysql-test/r/ctype_ucs.result 2008-12-23 14:21:01 +0000
+++ b/mysql-test/r/ctype_ucs.result 2009-12-03 12:02:37 +0000
@@ -1211,3 +1211,47 @@ HEX(DAYNAME(19700101))
0427043504420432043504400433
SET character_set_connection=latin1;
End of 5.0 tests
+Start of 5.1 tests
+SET NAMES utf8;
+CREATE TABLE t1 (
+a varchar(10) CHARACTER SET ucs2 COLLATE ucs2_czech_ci,
+key(a)
+);
+INSERT INTO t1 VALUES
+('aa'),('bb'),('cc'),('dd'),('ee'),('ff'),('gg'),('hh'),('ii'),
+('jj'),('kk'),('ll'),('mm'),('nn'),('oo'),('pp'),('rr'),('ss'),
+('tt'),('uu'),('vv'),('ww'),('xx'),('yy'),('zz');
+INSERT INTO t1 VALUES ('ca'),('cz'),('ch');
+INSERT INTO t1 VALUES ('da'),('dz'), (X'0064017E');
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'b%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'c%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 30 Using where; Using index
+SELECT * FROM t1 WHERE a LIKE 'c%';
+a
+ca
+cc
+cz
+ch
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'ch%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+SELECT * FROM t1 WHERE a LIKE 'ch%';
+a
+ch
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci;
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'd%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+SELECT hex(concat('d',_ucs2 0x017E,'%'));
+hex(concat('d',_ucs2 0x017E,'%'))
+0064017E0025
+EXPLAIN SELECT * FROM t1 WHERE a LIKE concat('d',_ucs2 0x017E,'%');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index
+SELECT hex(a) FROM t1 WHERE a LIKE concat('D',_ucs2 0x017E,'%');
+hex(a)
+0064017E
+DROP TABLE t1;
=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result 2009-01-26 21:19:13 +0000
+++ b/mysql-test/r/ctype_utf8.result 2010-01-04 12:35:54 +0000
@@ -1,3 +1,5 @@
+drop table if exists t1,t2,t3,t4;
+drop database if exists mysqltest;
drop table if exists t1,t2;
set names utf8;
select left(_utf8 0xD0B0D0B1D0B2,1);
=== removed file 'mysql-test/r/have_big5.require'
--- a/mysql-test/r/have_big5.require 2003-12-24 12:59:48 +0000
+++ b/mysql-test/r/have_big5.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-big5_chinese_ci big5 1 Yes Yes 1
=== removed file 'mysql-test/r/have_cp1250_ch.require'
--- a/mysql-test/r/have_cp1250_ch.require 2005-03-03 10:15:37 +0000
+++ b/mysql-test/r/have_cp1250_ch.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp1250_czech_cs cp1250 34 Yes 2
=== removed file 'mysql-test/r/have_cp1251.require'
--- a/mysql-test/r/have_cp1251.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_cp1251.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp1251_general_ci cp1251 51 Yes 0
=== removed file 'mysql-test/r/have_cp866.require'
--- a/mysql-test/r/have_cp866.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_cp866.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp866_general_ci cp866 36 Yes 0
=== removed file 'mysql-test/r/have_cp932.require'
--- a/mysql-test/r/have_cp932.require 2005-02-01 10:37:51 +0000
+++ b/mysql-test/r/have_cp932.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp932_japanese_ci cp932 95 Yes Yes 1
=== removed file 'mysql-test/r/have_eucjpms.require'
--- a/mysql-test/r/have_eucjpms.require 2005-02-01 10:37:51 +0000
+++ b/mysql-test/r/have_eucjpms.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-eucjpms_japanese_ci eucjpms 97 Yes Yes 1
=== removed file 'mysql-test/r/have_euckr.require'
--- a/mysql-test/r/have_euckr.require 2005-12-09 12:37:58 +0000
+++ b/mysql-test/r/have_euckr.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-euckr_korean_ci euckr 19 Yes Yes 1
=== removed file 'mysql-test/r/have_gb2312.require'
--- a/mysql-test/r/have_gb2312.require 2005-12-09 12:37:58 +0000
+++ b/mysql-test/r/have_gb2312.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-gb2312_chinese_ci gb2312 24 Yes Yes 1
=== removed file 'mysql-test/r/have_gbk.require'
--- a/mysql-test/r/have_gbk.require 2005-07-22 16:06:02 +0000
+++ b/mysql-test/r/have_gbk.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-gbk_chinese_ci gbk 28 Yes Yes 1
=== removed file 'mysql-test/r/have_koi8r.require'
--- a/mysql-test/r/have_koi8r.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_koi8r.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-koi8r_general_ci koi8r 7 Yes 0
=== removed file 'mysql-test/r/have_latin2_ch.require'
--- a/mysql-test/r/have_latin2_ch.require 2006-03-20 12:28:25 +0000
+++ b/mysql-test/r/have_latin2_ch.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-latin2_czech_cs latin2 2 Yes 4
=== removed file 'mysql-test/r/have_sjis.require'
--- a/mysql-test/r/have_sjis.require 2004-03-25 10:29:56 +0000
+++ b/mysql-test/r/have_sjis.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-sjis_japanese_ci sjis 13 Yes Yes 1
=== removed file 'mysql-test/r/have_tis620.require'
--- a/mysql-test/r/have_tis620.require 2003-12-25 16:11:01 +0000
+++ b/mysql-test/r/have_tis620.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-tis620_thai_ci tis620 18 Yes Yes 4
=== removed file 'mysql-test/r/have_ucs2.require'
--- a/mysql-test/r/have_ucs2.require 2003-06-02 12:19:06 +0000
+++ b/mysql-test/r/have_ucs2.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-ucs2_general_ci ucs2 35 Yes Yes 1
=== removed file 'mysql-test/r/have_ujis.require'
--- a/mysql-test/r/have_ujis.require 2003-09-19 10:18:19 +0000
+++ b/mysql-test/r/have_ujis.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-ujis_japanese_ci ujis 12 Yes Yes 1
=== removed file 'mysql-test/r/have_utf8.require'
--- a/mysql-test/r/have_utf8.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_utf8.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-utf8_general_ci utf8 33 Yes Yes 1
=== modified file 'mysql-test/r/innodb.result'
--- a/mysql-test/r/innodb.result 2009-11-13 21:26:08 +0000
+++ b/mysql-test/r/innodb.result 2009-12-27 13:54:41 +0000
@@ -3160,15 +3160,6 @@ ALTER TABLE t2 MODIFY a INT NOT NULL;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
DELETE FROM t1;
DROP TABLE t2,t1;
-CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
-ENGINE=InnoDB;
-INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
-DELETE FROM t1;
-INSERT INTO t1 VALUES ('DDD');
-SELECT * FROM t1;
-a
-DDD
-DROP TABLE t1;
CREATE TABLE t1 (id int PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
AUTO_INCREMENT=42;
INSERT INTO t1 VALUES (0),(347),(0);
=== added file 'mysql-test/r/innodb_utf8.result'
--- a/mysql-test/r/innodb_utf8.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/innodb_utf8.result 2009-12-27 13:54:41 +0000
@@ -0,0 +1,10 @@
+drop table if exists t1;
+CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
+DELETE FROM t1;
+INSERT INTO t1 VALUES ('DDD');
+SELECT * FROM t1;
+a
+DDD
+DROP TABLE t1;
=== modified file 'mysql-test/r/warnings.result'
--- a/mysql-test/r/warnings.result 2009-09-10 08:49:49 +0000
+++ b/mysql-test/r/warnings.result 2009-12-06 17:26:12 +0000
@@ -319,3 +319,17 @@ SHOW ERRORS;
Level Code Message
Error 1051 Unknown table 't1'
End of 5.0 tests
+set sql_mode = default;
+select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t;
+CAST(a AS DECIMAL(13,5))
+0.00000
+Warnings:
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Warning 1292 Truncated incorrect DECIMAL value: ''
+create table t1 (a integer unsigned);
+insert into t1 values (1),(-1),(0),(-2);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 2
+Warning 1264 Out of range value for column 'a' at row 4
+drop table t1;
+End of 5.1 tests
=== modified file 'mysql-test/suite/federated/disabled.def'
--- a/mysql-test/suite/federated/disabled.def 2009-10-30 18:50:56 +0000
+++ b/mysql-test/suite/federated/disabled.def 2009-11-14 19:33:59 +0000
@@ -9,5 +9,4 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-federated_server : needs fixup
=== modified file 'mysql-test/suite/federated/federated_server.result'
--- a/mysql-test/suite/federated/federated_server.result 2009-10-30 18:50:56 +0000
+++ b/mysql-test/suite/federated/federated_server.result 2009-11-14 19:33:59 +0000
@@ -175,6 +175,8 @@ CREATE TABLE db_bogus.t1 (
)
;
INSERT INTO db_bogus.t1 VALUES ('2','this is bogus');
+create user test_fed@localhost identified by 'foo';
+grant all on db_legitimate.* to test_fed@localhost;
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
@@ -211,15 +213,14 @@ id name
alter server s1 options (database 'db_bogus');
flush tables;
select * from federated.t1;
-id name
-2 this is bogus
+ERROR HY000: There was a problem processing the query on the foreign data source. Data source error: : 1044 : Access denied for user 'test_fed'@'localhost' to databa
drop server if exists 's1';
ERROR 42000: Access denied; you need the SUPER privilege for this operation
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
-USER 'root',
-PASSWORD '',
+USER 'test_fed',
+PASSWORD 'foo',
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
@@ -228,8 +229,8 @@ drop server 's1';
create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
-USER 'root',
-PASSWORD '',
+USER 'test_fed',
+PASSWORD 'foo',
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
@@ -237,6 +238,7 @@ flush tables;
select * from federated.t1;
id name
1 this is legitimate
+drop user test_fed@localhost;
drop database db_legitimate;
drop database db_bogus;
drop user guest_super@localhost;
@@ -275,6 +277,6 @@ call p1();
drop procedure p1;
drop server if exists s;
DROP TABLE IF EXISTS federated.t1;
-DROP DATABASE federated;
+DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
-DROP DATABASE federated;
+DROP DATABASE IF EXISTS federated;
=== modified file 'mysql-test/suite/federated/federated_server.test'
--- a/mysql-test/suite/federated/federated_server.test 2009-10-30 18:50:56 +0000
+++ b/mysql-test/suite/federated/federated_server.test 2009-11-14 19:33:59 +0000
@@ -239,6 +239,7 @@ alter server s1 options (database 'db_bo
connection master;
flush tables;
+--error ER_QUERY_ON_FOREIGN_DATA_SOURCE
select * from federated.t1;
connection conn_select;
@@ -249,8 +250,8 @@ drop server if exists 's1';
eval create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
- USER 'root',
- PASSWORD '',
+ USER 'test_fed',
+ PASSWORD 'foo',
PORT $SLAVE_MYPORT,
SOCKET '',
OWNER 'root');
@@ -261,8 +262,8 @@ drop server 's1';
eval create server 's1' foreign data wrapper 'mysql' options
(HOST '127.0.0.1',
DATABASE 'db_legitimate',
- USER 'root',
- PASSWORD '',
+ USER 'test_fed',
+ PASSWORD 'foo',
PORT $SLAVE_MYPORT,
SOCKET '',
OWNER 'root');
@@ -273,6 +274,7 @@ select * from federated.t1;
# clean up test
connection slave;
+drop user test_fed@localhost;
drop database db_legitimate;
drop database db_bogus;
=== modified file 'mysql-test/suite/funcs_1/r/innodb_func_view.result'
--- a/mysql-test/suite/funcs_1/r/innodb_func_view.result 2009-05-15 12:57:51 +0000
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result 2009-12-06 17:26:12 +0000
@@ -3372,9 +3372,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3389,9 +3389,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3408,11 +3408,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3430,11 +3430,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3454,9 +3454,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3471,9 +3471,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3490,11 +3490,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3510,11 +3510,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/funcs_1/r/memory_func_view.result'
--- a/mysql-test/suite/funcs_1/r/memory_func_view.result 2009-02-14 16:00:11 +0000
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result 2009-12-06 17:26:12 +0000
@@ -3373,9 +3373,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3390,9 +3390,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3409,11 +3409,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3431,11 +3431,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3455,9 +3455,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3472,9 +3472,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3491,11 +3491,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3511,11 +3511,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/funcs_1/r/myisam_func_view.result'
--- a/mysql-test/suite/funcs_1/r/myisam_func_view.result 2009-02-14 16:00:11 +0000
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result 2009-12-06 17:26:12 +0000
@@ -3373,9 +3373,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3390,9 +3390,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3409,11 +3409,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3431,11 +3431,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3455,9 +3455,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3472,9 +3472,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
+Error 1366 Incorrect decimal value: '' for column '' at row 0
DROP VIEW v1;
@@ -3491,11 +3491,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3511,11 +3511,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Error 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: ' ---����@�*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/rpl/t/rpl_ignore_table.test'
--- a/mysql-test/suite/rpl/t/rpl_ignore_table.test 2008-11-13 19:19:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test 2009-12-27 13:54:41 +0000
@@ -1,4 +1,6 @@
source include/master-slave.inc;
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
#
# BUG#16487
=== added file 'mysql-test/t/create-uca.test'
--- a/mysql-test/t/create-uca.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/create-uca.test 2009-12-27 13:54:41 +0000
@@ -0,0 +1,26 @@
+# Prerequisites
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
+# Initial cleanup
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+#
+# Bug#21380: DEFAULT definition not always transfered by CREATE
+# TABLE/SELECT to the new table.
+#
+
+CREATE TABLE t1(
+ c1 INT DEFAULT 12 COMMENT 'column1',
+ c2 INT NULL COMMENT 'column2',
+ c3 INT NOT NULL COMMENT 'column3',
+ c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
+ c6 VARCHAR(255))
+ COLLATE latin1_bin;
+SHOW CREATE TABLE t1;
+CREATE TABLE t2 AS SELECT * FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
=== modified file 'mysql-test/t/create.test'
--- a/mysql-test/t/create.test 2009-11-16 20:49:51 +0000
+++ b/mysql-test/t/create.test 2009-12-27 13:54:41 +0000
@@ -1400,52 +1400,6 @@ drop table t1;
--echo
--echo # --
---echo # -- Bug#21380: DEFAULT definition not always transfered by CREATE
---echo # -- TABLE/SELECT to the new table.
---echo # --
---echo
-
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
-
---echo
-
-CREATE TABLE t1(
- c1 INT DEFAULT 12 COMMENT 'column1',
- c2 INT NULL COMMENT 'column2',
- c3 INT NOT NULL COMMENT 'column3',
- c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
- c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
- c6 VARCHAR(255))
- COLLATE latin1_bin;
-
---echo
-
-SHOW CREATE TABLE t1;
-
---echo
-
-CREATE TABLE t2 AS SELECT * FROM t1;
-
---echo
-
-SHOW CREATE TABLE t2;
-
---echo
-
-DROP TABLE t2;
-DROP TABLE t1;
-
---echo
---echo # -- End of test case for Bug#21380.
-
-###########################################################################
-
---echo
---echo # --
--echo # -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields
--echo # --
--echo
=== modified file 'mysql-test/t/ctype_ucs.test'
--- a/mysql-test/t/ctype_ucs.test 2008-12-23 14:21:01 +0000
+++ b/mysql-test/t/ctype_ucs.test 2009-12-03 12:02:37 +0000
@@ -723,3 +723,34 @@ SELECT HEX(DAYNAME(19700101));
SET character_set_connection=latin1;
--echo End of 5.0 tests
+
+
+--echo Start of 5.1 tests
+#
+# Checking my_like_range_ucs2
+#
+SET NAMES utf8;
+CREATE TABLE t1 (
+ a varchar(10) CHARACTER SET ucs2 COLLATE ucs2_czech_ci,
+ key(a)
+);
+INSERT INTO t1 VALUES
+('aa'),('bb'),('cc'),('dd'),('ee'),('ff'),('gg'),('hh'),('ii'),
+('jj'),('kk'),('ll'),('mm'),('nn'),('oo'),('pp'),('rr'),('ss'),
+('tt'),('uu'),('vv'),('ww'),('xx'),('yy'),('zz');
+INSERT INTO t1 VALUES ('ca'),('cz'),('ch');
+INSERT INTO t1 VALUES ('da'),('dz'), (X'0064017E');
+# This one should scan only one row
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'b%';
+# This one should scan many rows: 'c' is a contraction head
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'c%';
+SELECT * FROM t1 WHERE a LIKE 'c%';
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'ch%';
+SELECT * FROM t1 WHERE a LIKE 'ch%';
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ucs2 COLLATE ucs2_croatian_ci;
+EXPLAIN SELECT * FROM t1 WHERE a LIKE 'd%';
+SELECT hex(concat('d',_ucs2 0x017E,'%'));
+EXPLAIN SELECT * FROM t1 WHERE a LIKE concat('d',_ucs2 0x017E,'%');
+SELECT hex(a) FROM t1 WHERE a LIKE concat('D',_ucs2 0x017E,'%');
+
+DROP TABLE t1;
=== modified file 'mysql-test/t/ctype_utf8.test'
--- a/mysql-test/t/ctype_utf8.test 2009-01-26 21:19:13 +0000
+++ b/mysql-test/t/ctype_utf8.test 2009-12-27 13:54:41 +0000
@@ -2,6 +2,15 @@
# Tests with the utf8 character set
#
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
+--disable_warnings
+drop table if exists t1,t2,t3,t4;
+drop database if exists mysqltest;
+--enable_warnings
+
+
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
=== modified file 'mysql-test/t/ddl_i18n_koi8r.test'
--- a/mysql-test/t/ddl_i18n_koi8r.test 2009-05-15 10:15:56 +0000
+++ b/mysql-test/t/ddl_i18n_koi8r.test 2009-12-27 13:54:41 +0000
@@ -36,6 +36,8 @@
--source include/have_cp866.inc
--source include/have_cp1251.inc
--source include/have_koi8r.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
###########################################################################
=== modified file 'mysql-test/t/ddl_i18n_utf8.test'
--- a/mysql-test/t/ddl_i18n_utf8.test 2009-05-15 10:15:56 +0000
+++ b/mysql-test/t/ddl_i18n_utf8.test 2009-12-27 13:54:41 +0000
@@ -36,6 +36,8 @@
--source include/have_cp866.inc
--source include/have_cp1251.inc
--source include/have_koi8r.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
###########################################################################
=== modified file 'mysql-test/t/fulltext.test'
--- a/mysql-test/t/fulltext.test 2009-09-07 20:50:10 +0000
+++ b/mysql-test/t/fulltext.test 2009-12-27 13:54:41 +0000
@@ -2,6 +2,9 @@
# Test of fulltext index
#
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
--disable_warnings
drop table if exists t1,t2,t3;
--enable_warnings
=== modified file 'mysql-test/t/fulltext2.test'
--- a/mysql-test/t/fulltext2.test 2009-10-28 07:52:34 +0000
+++ b/mysql-test/t/fulltext2.test 2009-12-27 13:54:41 +0000
@@ -2,6 +2,9 @@
# test of new fulltext search features
#
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
#
# two-level tree
#
=== modified file 'mysql-test/t/innodb.test'
--- a/mysql-test/t/innodb.test 2009-11-13 21:26:08 +0000
+++ b/mysql-test/t/innodb.test 2009-12-27 13:54:41 +0000
@@ -2353,18 +2353,6 @@ DELETE FROM t1;
DROP TABLE t2,t1;
#
-# Bug #26835: table corruption after delete+insert
-#
-
-CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
-ENGINE=InnoDB;
-INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
-DELETE FROM t1;
-INSERT INTO t1 VALUES ('DDD');
-SELECT * FROM t1;
-DROP TABLE t1;
-
-#
# Bug #23313 (AUTO_INCREMENT=# not reported back for InnoDB tables)
# Bug #21404 (AUTO_INCREMENT value reset when Adding FKEY (or ALTER?))
#
=== added file 'mysql-test/t/innodb_utf8.test'
--- a/mysql-test/t/innodb_utf8.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/innodb_utf8.test 2009-12-27 13:54:41 +0000
@@ -0,0 +1,24 @@
+#
+# Tests for innodb that requires not default character sets
+#
+
+--source include/have_innodb.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
+# Setup
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+#
+# Bug #26835: table corruption after delete+insert
+#
+
+CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
+DELETE FROM t1;
+INSERT INTO t1 VALUES ('DDD');
+SELECT * FROM t1;
+DROP TABLE t1;
=== modified file 'mysql-test/t/query_cache_ps_no_prot.test'
--- a/mysql-test/t/query_cache_ps_no_prot.test 2007-05-24 20:13:49 +0000
+++ b/mysql-test/t/query_cache_ps_no_prot.test 2009-12-27 13:54:41 +0000
@@ -11,8 +11,9 @@
# We cannot run on embedded server because we use multiple sessions.
--source include/not_embedded.inc
-
--source include/have_query_cache.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
# The file with expected results fits only to a run without
# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
=== modified file 'mysql-test/t/query_cache_ps_ps_prot.test'
--- a/mysql-test/t/query_cache_ps_ps_prot.test 2007-05-24 20:13:49 +0000
+++ b/mysql-test/t/query_cache_ps_ps_prot.test 2009-12-27 13:54:41 +0000
@@ -11,8 +11,9 @@
# We cannot run on embedded server because we use multiple sessions.
--source include/not_embedded.inc
-
--source include/have_query_cache.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
# The file with expected results fits only to a run with "--ps-protocol".
if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0
=== modified file 'mysql-test/t/warnings.test'
--- a/mysql-test/t/warnings.test 2009-11-16 20:49:51 +0000
+++ b/mysql-test/t/warnings.test 2009-12-06 17:26:12 +0000
@@ -194,7 +194,6 @@ DROP PROCEDURE sp1;
DROP PROCEDURE sp2;
DROP PROCEDURE sp3;
-
#
# Bug#30059: End-space truncation warnings are inconsistent or incorrect
#
@@ -235,3 +234,15 @@ DROP TABLE t1;
SHOW ERRORS;
--echo End of 5.0 tests
+
+#
+# Test warning with row numbers
+#
+
+set sql_mode = default;
+select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t;
+create table t1 (a integer unsigned);
+insert into t1 values (1),(-1),(0),(-2);
+drop table t1;
+
+--echo End of 5.1 tests
=== modified file 'plugin/fulltext/plugin_example.c'
--- a/plugin/fulltext/plugin_example.c 2009-12-08 21:47:54 +0000
+++ b/plugin/fulltext/plugin_example.c 2010-01-04 17:54:42 +0000
@@ -145,7 +145,7 @@ static int simple_parser_deinit(MYSQL_FT
the list of search terms when parsing a search string.
*/
-static void add_word(MYSQL_FTPARSER_PARAM *param, char *word, size_t len)
+static void add_word(MYSQL_FTPARSER_PARAM *param, const unsigned char *word, size_t len)
{
MYSQL_FTPARSER_BOOLEAN_INFO bool_info=
{ FT_TOKEN_WORD, 0, 0, 0, 0, ' ', 0 };
@@ -169,11 +169,11 @@ static void add_word(MYSQL_FTPARSER_PARA
static int simple_parser_parse(MYSQL_FTPARSER_PARAM *param)
{
- char *end, *start, *docend= (char *)param->doc + param->length;
+ const unsigned char *end, *start, *docend= param->doc + param->length;
number_of_calls++;
- for (end= start= (char *)param->doc;; end++)
+ for (end= start= param->doc;; end++)
{
if (end == docend)
{
=== modified file 'scripts/mysqlbug.sh'
--- a/scripts/mysqlbug.sh 2007-10-19 17:06:30 +0000
+++ b/scripts/mysqlbug.sh 2009-12-27 13:54:41 +0000
@@ -21,7 +21,7 @@ echo "Finding system information for a M
VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@"
COMPILATION_COMMENT="@COMPILATION_COMMENT@"
-BUGmysql="mysql(a)lists.mysql.com"
+BUGmysql="maria-developers(a)lists.launchpad.net"
# This is set by configure
COMP_CALL_INFO="CC='@SAVE_CC@' CFLAGS='@SAVE_CFLAGS@' CXX='@SAVE_CXX@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'"
COMP_RUN_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'"
=== modified file 'sql-common/client.c'
--- a/sql-common/client.c 2009-11-16 20:49:51 +0000
+++ b/sql-common/client.c 2009-12-03 15:26:54 +0000
@@ -3208,7 +3208,7 @@ const char * STDCALL mysql_error(MYSQL *
mysql Connection
EXAMPLE
- 4.1.0-alfa -> 40100
+ MariaDB-4.1.0-alfa -> 40100
NOTES
We will ensure that a newer server always has a bigger number.
@@ -3221,7 +3221,11 @@ ulong STDCALL
mysql_get_server_version(MYSQL *mysql)
{
uint major, minor, version;
- char *pos= mysql->server_version, *end_pos;
+ const char *pos= mysql->server_version;
+ char *end_pos;
+ /* Skip possible prefix */
+ while (*pos && !my_isdigit(&my_charset_latin1, *pos))
+ pos++;
major= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1;
minor= (uint) strtoul(pos, &end_pos, 10); pos=end_pos+1;
version= (uint) strtoul(pos, &end_pos, 10);
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc 2009-12-08 21:47:54 +0000
+++ b/sql/handler.cc 2010-01-04 17:54:42 +0000
@@ -1585,16 +1585,6 @@ int ha_recover(HASH *commit_list)
if (info.commit_list)
sql_print_information("Starting crash recovery...");
-#ifndef WILL_BE_DELETED_LATER
- /*
- for now, only InnoDB supports 2pc. It means we can always safely
- rollback all pending transactions, without risking inconsistent data
- */
- DBUG_ASSERT(total_ha_2pc == (ulong) opt_bin_log+1); // only InnoDB and binlog
- tc_heuristic_recover= TC_HEURISTIC_RECOVER_ROLLBACK; // forcing ROLLBACK
- info.dry_run=FALSE;
-#endif
-
for (info.len= MAX_XID_LIST_SIZE ;
info.list==0 && info.len > MIN_XID_LIST_SIZE; info.len/=2)
{
=== modified file 'sql/my_decimal.cc'
--- a/sql/my_decimal.cc 2008-11-27 11:33:04 +0000
+++ b/sql/my_decimal.cc 2009-12-06 17:26:12 +0000
@@ -38,7 +38,7 @@ int decimal_operation_results(int result
case E_DEC_TRUNCATED:
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
WARN_DATA_TRUNCATED, ER(WARN_DATA_TRUNCATED),
- "", (long)-1);
+ "", (ulong) 0);
break;
case E_DEC_OVERFLOW:
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
@@ -54,7 +54,7 @@ int decimal_operation_results(int result
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
- "decimal", "", "", (long)-1);
+ "decimal", "", "", (ulong) 0);
break;
case E_DEC_OOM:
my_error(ER_OUT_OF_RESOURCES, MYF(0));
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2009-12-08 21:47:54 +0000
+++ b/sql/mysqld.cc 2010-01-04 17:54:42 +0000
@@ -4196,8 +4196,10 @@ server.");
Need to unlock as global_system_variables.table_plugin
was acquired during plugin_init()
*/
+ pthread_mutex_lock(&LOCK_global_system_variables);
plugin_unlock(0, global_system_variables.table_plugin);
global_system_variables.table_plugin= plugin;
+ pthread_mutex_unlock(&LOCK_global_system_variables);
}
}
#if defined(WITH_MARIA_STORAGE_ENGINE) && defined(USE_MARIA_FOR_TMP_TABLES)
=== modified file 'sql/share/errmsg.txt'
--- a/sql/share/errmsg.txt 2009-12-08 21:47:54 +0000
+++ b/sql/share/errmsg.txt 2010-01-04 17:54:42 +0000
@@ -3173,22 +3173,22 @@ ER_CANT_CREATE_THREAD
swe "Kan inte skapa en ny tr�d (errno %d)"
ukr "�� ���� �������� ���� ����� (������� %d). ���� �� �� ����������� ��� ���'���, �� ���������� ������������ �� ����� �� - ������� �� ������� ��"
ER_WRONG_VALUE_COUNT_ON_ROW 21S01
- cze "Po-B�et sloupc� neodpov�d� po�tu hodnot na ��dku %ld"
- dan "Kolonne antallet stemmer ikke overens med antallet af v�rdier i post %ld"
- nla "Kolom aantal komt niet overeen met waarde aantal in rij %ld"
- eng "Column count doesn't match value count at row %ld"
- est "Tulpade hulk erineb v��rtuste hulgast real %ld"
- ger "Anzahl der Felder stimmt nicht mit der Anzahl der Werte in Zeile %ld �berein"
- hun "Az oszlopban talalhato ertek nem egyezik meg a %ld sorban szamitott ertekkel"
- ita "Il numero delle colonne non corrisponde al conteggio alla riga %ld"
- kor "Row %ld���� ���� �������� value �������� �������� ��������."
- por "Contagem de colunas n�o confere com a contagem de valores na linha %ld"
- rum "Numarul de coloane nu corespunde cu numarul de valori la linia %ld"
- rus "���������� �������� �� ��������� � ����������� �������� � ������ %ld"
- serbian "Broj kolona ne odgovara broju vrednosti u slogu %ld"
- spa "El n�mero de columnas no corresponde al n�mero en la l�nea %ld"
- swe "Antalet kolumner motsvarar inte antalet v�rden p� rad: %ld"
- ukr "��������� �������� �� ��������� � ��������� ������� � ������ %ld"
+ cze "Po-B�et sloupc� neodpov�d� po�tu hodnot na ��dku %lu"
+ dan "Kolonne antallet stemmer ikke overens med antallet af v�rdier i post %lu"
+ nla "Kolom aantal komt niet overeen met waarde aantal in rij %lu"
+ eng "Column count doesn't match value count at row %lu"
+ est "Tulpade hulk erineb v��rtuste hulgast real %lu"
+ ger "Anzahl der Felder stimmt nicht mit der Anzahl der Werte in Zeile %lu �berein"
+ hun "Az oszlopban talalhato ertek nem egyezik meg a %lu sorban szamitott ertekkel"
+ ita "Il numero delle colonne non corrisponde al conteggio alla riga %lu"
+ kor "Row %lu���� ���� �������� value �������� �������� ��������."
+ por "Contagem de colunas n�o confere com a contagem de valores na linha %lu"
+ rum "Numarul de coloane nu corespunde cu numarul de valori la linia %lu"
+ rus "���������� �������� �� ��������� � ����������� �������� � ������ %lu"
+ serbian "Broj kolona ne odgovara broju vrednosti u slogu %lu"
+ spa "El n�mero de columnas no corresponde al n�mero en la l�nea %lu"
+ swe "Antalet kolumner motsvarar inte antalet v�rden p� rad: %lu"
+ ukr "��������� �������� �� ��������� � ��������� ������� � ������ %lu"
ER_CANT_REOPEN_TABLE
cze "Nemohu znovuotev-B��t tabulku: '%-.192s"
dan "Kan ikke gen�bne tabel '%-.192s"
@@ -4887,29 +4887,29 @@ ER_CUT_VALUE_GROUP_CONCAT
swe "%d rad(er) kapades av group_concat()"
ukr "%d line(s) was(were) cut by group_concat()"
ER_WARN_TOO_FEW_RECORDS 01000
- eng "Row %ld doesn't contain data for all columns"
- ger "Zeile %ld enth�lt nicht f�r alle Felder Daten"
- nla "Rij %ld bevat niet de data voor alle kolommen"
- por "Conta de registro � menor que a conta de coluna na linha %ld"
- spa "L�nea %ld no contiene datos para todas las columnas"
+ eng "Row %lu doesn't contain data for all columns"
+ ger "Zeile %lu enth�lt nicht f�r alle Felder Daten"
+ nla "Rij %lu bevat niet de data voor alle kolommen"
+ por "Conta de registro � menor que a conta de coluna na linha %lu"
+ spa "L�nea %lu no contiene datos para todas las columnas"
ER_WARN_TOO_MANY_RECORDS 01000
- eng "Row %ld was truncated; it contained more data than there were input columns"
- ger "Zeile %ld gek�rzt, die Zeile enthielt mehr Daten, als es Eingabefelder gibt"
- nla "Regel %ld ingekort, bevatte meer data dan invoer kolommen"
- por "Conta de registro � maior que a conta de coluna na linha %ld"
- spa "L�nea %ld fu� truncada; La misma contine mas datos que las que existen en las columnas de entrada"
+ eng "Row %lu was truncated; it contained more data than there were input columns"
+ ger "Zeile %lu gek�rzt, die Zeile enthielt mehr Daten, als es Eingabefelder gibt"
+ nla "Regel %lu ingekort, bevatte meer data dan invoer kolommen"
+ por "Conta de registro � maior que a conta de coluna na linha %lu"
+ spa "L�nea %lu fu� truncada; La misma contine mas datos que las que existen en las columnas de entrada"
ER_WARN_NULL_TO_NOTNULL 22004
- eng "Column set to default value; NULL supplied to NOT NULL column '%s' at row %ld"
- ger "Feld auf Vorgabewert gesetzt, da NULL f�r NOT-NULL-Feld '%s' in Zeile %ld angegeben"
- por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %ld"
- spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la l�nea %ld"
+ eng "Column set to default value; NULL supplied to NOT NULL column '%s' at row %lu"
+ ger "Feld auf Vorgabewert gesetzt, da NULL f�r NOT-NULL-Feld '%s' in Zeile %lu angegeben"
+ por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %lu"
+ spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la l�nea %lu"
ER_WARN_DATA_OUT_OF_RANGE 22003
- eng "Out of range value for column '%s' at row %ld"
+ eng "Out of range value for column '%s' at row %lu"
WARN_DATA_TRUNCATED 01000
- eng "Data truncated for column '%s' at row %ld"
- ger "Daten abgeschnitten f�r Feld '%s' in Zeile %ld"
- por "Dado truncado para coluna '%s' na linha %ld"
- spa "Datos truncados para columna '%s' en la l�nea %ld"
+ eng "Data truncated for column '%s' at row %lu"
+ ger "Daten abgeschnitten f�r Feld '%s' in Zeile %lu"
+ por "Dado truncado para coluna '%s' na linha %lu"
+ spa "Datos truncados para columna '%s' en la l�nea %lu"
ER_WARN_USING_OTHER_HANDLER
eng "Using storage engine %s for table '%s'"
ger "F�r Tabelle '%s' wird Speicher-Engine %s benutzt"
@@ -5090,8 +5090,8 @@ ER_UNKNOWN_TIME_ZONE
eng "Unknown or incorrect time zone: '%-.64s'"
ger "Unbekannte oder falsche Zeitzone: '%-.64s'"
ER_WARN_INVALID_TIMESTAMP
- eng "Invalid TIMESTAMP value in column '%s' at row %ld"
- ger "Ung�ltiger TIMESTAMP-Wert in Feld '%s', Zeile %ld"
+ eng "Invalid TIMESTAMP value in column '%s' at row %lu"
+ ger "Ung�ltiger TIMESTAMP-Wert in Feld '%s', Zeile %lu"
ER_INVALID_CHARACTER_STRING
eng "Invalid %s character string: '%.64s'"
ger "Ung�ltiger %s-Zeichen-String: '%.64s'"
@@ -5322,8 +5322,8 @@ ER_DIVISION_BY_ZERO 22012
eng "Division by 0"
ger "Division durch 0"
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
- eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld"
- ger "Falscher %-.32s-Wert: '%-.128s' f�r Feld '%.192s' in Zeile %ld"
+ eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %lu"
+ ger "Falscher %-.32s-Wert: '%-.128s' f�r Feld '%.192s' in Zeile %lu"
ER_ILLEGAL_VALUE_FOR_TYPE 22007
eng "Illegal %s '%-.192s' value found during parsing"
ger "Nicht zul�ssiger %s-Wert '%-.192s' beim Parsen gefunden"
@@ -5456,8 +5456,8 @@ ER_PROC_AUTO_REVOKE_FAIL
eng "Failed to revoke all privileges to dropped routine"
ger "R�cknahme aller Rechte f�r die gel�schte Routine fehlgeschlagen"
ER_DATA_TOO_LONG 22001
- eng "Data too long for column '%s' at row %ld"
- ger "Daten zu lang f�r Feld '%s' in Zeile %ld"
+ eng "Data too long for column '%s' at row %lu"
+ ger "Daten zu lang f�r Feld '%s' in Zeile %lu"
ER_SP_BAD_SQLSTATE 42000
eng "Bad SQLSTATE: '%s'"
ger "Ung�ltiger SQLSTATE: '%s'"
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2009-11-16 20:49:51 +0000
+++ b/sql/slave.cc 2009-12-06 17:51:48 +0000
@@ -1117,18 +1117,27 @@ be equal for the Statement-format replic
goto err;
}
}
- else if (is_network_error(mysql_errno(mysql)))
+ else if (is_network_error(err_code= mysql_errno(mysql)))
{
- mi->report(WARNING_LEVEL, mysql_errno(mysql),
- "Get master TIME_ZONE failed with error: %s", mysql_error(mysql));
+ mi->report(ERROR_LEVEL, err_code,
+ "Get master TIME_ZONE failed with error: %s",
+ mysql_error(mysql));
goto network_err;
- }
+ }
+ else if (err_code == ER_UNKNOWN_SYSTEM_VARIABLE)
+ {
+ /* We use ERROR_LEVEL to get the error logged to file */
+ mi->report(ERROR_LEVEL, err_code,
+
+ "MySQL master doesn't have a TIME_ZONE variable. Note that"
+ "if your timezone is not same between master and slave, your "
+ "slave may get wrong data into timestamp columns");
+ }
else
{
/* Fatal error */
errmsg= "The slave I/O thread stops because a fatal error is encountered \
when it try to get the value of TIME_ZONE global variable from master.";
- err_code= mysql_errno(mysql);
sprintf(err_buff, "%s Error: %s", errmsg, mysql_error(mysql));
goto err;
}
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2009-12-08 21:47:54 +0000
+++ b/sql/sql_base.cc 2010-01-04 17:54:42 +0000
@@ -8631,19 +8631,26 @@ bool remove_table_from_cache(THD *thd, c
result=1;
}
/* Kill delayed insert threads */
- if ((in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT) &&
- ! in_use->killed)
+ if ((in_use->system_thread & SYSTEM_THREAD_DELAYED_INSERT))
{
- in_use->killed= THD::KILL_CONNECTION;
- pthread_mutex_lock(&in_use->mysys_var->mutex);
- if (in_use->mysys_var->current_cond)
- {
- pthread_mutex_lock(in_use->mysys_var->current_mutex);
- signalled= 1;
- pthread_cond_broadcast(in_use->mysys_var->current_cond);
- pthread_mutex_unlock(in_use->mysys_var->current_mutex);
- }
- pthread_mutex_unlock(&in_use->mysys_var->mutex);
+ if (!in_use->killed)
+ {
+ in_use->killed= THD::KILL_CONNECTION;
+ pthread_mutex_lock(&in_use->mysys_var->mutex);
+ if (in_use->mysys_var->current_cond)
+ {
+ pthread_mutex_lock(in_use->mysys_var->current_mutex);
+ signalled= 1;
+ pthread_cond_broadcast(in_use->mysys_var->current_cond);
+ pthread_mutex_unlock(in_use->mysys_var->current_mutex);
+ }
+ pthread_mutex_unlock(&in_use->mysys_var->mutex);
+ }
+ /*
+ Don't abort locks. Instead give the delayed insert thread
+ time to finish it's inserts and die gracefully.
+ */
+ continue;
}
/*
Now we must abort all tables locks used by this thread
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2009-12-08 21:47:54 +0000
+++ b/sql/sql_class.cc 2010-01-04 17:54:42 +0000
@@ -2170,7 +2170,7 @@ bool select_export::send_data(List<Item>
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"string", printable_buff,
- item->name, row_count);
+ item->name, (ulong) row_count);
}
cvt_str.length(bytes);
res= &cvt_str;
=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc 2009-12-08 21:47:54 +0000
+++ b/sql/sql_insert.cc 2010-01-04 17:54:42 +0000
@@ -2622,7 +2622,7 @@ bool Delayed_insert::handle_inserts(void
or if another thread is removing the current table definition
from the table cache.
*/
- my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
+ my_error(ER_DELAYED_CANT_CHANGE_LOCK, MYF(ME_FATALERROR | ME_NOREFRESH),
table->s->table_name.str);
goto err;
}
@@ -2795,10 +2795,11 @@ bool Delayed_insert::handle_inserts(void
query_cache_invalidate3(&thd, table, 1);
if (thr_reschedule_write_lock(*thd.lock->locks))
{
- /* This is not known to happen. */
- my_error(ER_DELAYED_CANT_CHANGE_LOCK,MYF(ME_FATALERROR),
- table->s->table_name.str);
- goto err;
+ /* This is not known to happen. */
+ my_error(ER_DELAYED_CANT_CHANGE_LOCK,
+ MYF(ME_FATALERROR | ME_NOREFRESH),
+ table->s->table_name.str);
+ goto err;
}
if (!using_bin_log)
table->file->extra(HA_EXTRA_WRITE_CACHE);
=== modified file 'storage/federatedx/ha_federatedx.cc'
--- a/storage/federatedx/ha_federatedx.cc 2009-11-30 21:37:27 +0000
+++ b/storage/federatedx/ha_federatedx.cc 2009-12-03 11:34:11 +0000
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008, Patrick Galbraith
+Copyright (c) 2008-2009, Patrick Galbraith & Antony Curtis
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -308,7 +308,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
*/
-#define MYSQL_SERVER 1q
+#define MYSQL_SERVER 1
#include "mysql_priv.h"
#include <mysql/plugin.h>
@@ -1627,7 +1627,13 @@ static int free_server(federatedx_txn *t
{
MEM_ROOT mem_root;
- txn->close(server);
+ if (!txn)
+ {
+ federatedx_txn tmp_txn;
+ tmp_txn.close(server);
+ }
+ else
+ txn->close(server);
DBUG_ASSERT(server->io_count == 0);
@@ -1785,21 +1791,25 @@ int ha_federatedx::close(void)
if (stored_result)
retval= free_result();
- /* Disconnect from mysql. thd may be null during refresh */
- txn= thd ? get_txn(thd, true) : new federatedx_txn();
+ /* Disconnect from mysql */
+ if (!thd || !(txn= get_txn(thd, true)))
+ {
+ federatedx_txn tmp_txn;
+
+ tmp_txn.release(&io);
- if (txn)
+ DBUG_ASSERT(io == NULL);
+
+ if ((error= free_share(&tmp_txn, share)))
+ retval= error;
+ }
+ else
{
txn->release(&io);
-
DBUG_ASSERT(io == NULL);
if ((error= free_share(txn, share)))
retval= error;
-
- if (!thd)
- delete txn;
-
}
DBUG_RETURN(retval);
}
@@ -2793,14 +2803,16 @@ int ha_federatedx::rnd_end()
int ha_federatedx::free_result()
{
int error;
+ federatedx_io *tmp_io= 0, **iop;
DBUG_ASSERT(stored_result);
- if ((error= txn->acquire(share, FALSE, &io)))
+ if (!*(iop= &io) && (error= txn->acquire(share, TRUE, (iop= &tmp_io))))
{
DBUG_ASSERT(0); // Fail when testing
return error;
}
- io->free_result(stored_result);
+ (*iop)->free_result(stored_result);
stored_result= 0;
+ txn->release(&tmp_io);
return 0;
}
@@ -2985,7 +2997,7 @@ int ha_federatedx::info(uint flag)
{
char error_buffer[FEDERATEDX_QUERY_BUFFER_SIZE];
uint error_code;
- federatedx_io *tmp_io= 0;
+ federatedx_io *tmp_io= 0, **iop= 0;
DBUG_ENTER("ha_federatedx::info");
error_code= ER_QUERY_ON_FOREIGN_DATA_SOURCE;
@@ -2993,7 +3005,7 @@ int ha_federatedx::info(uint flag)
/* we want not to show table status if not needed to do so */
if (flag & (HA_STATUS_VARIABLE | HA_STATUS_CONST | HA_STATUS_AUTO))
{
- if ((error_code= txn->acquire(share, TRUE, &tmp_io)))
+ if (!*(iop= &io) && (error_code= txn->acquire(share, TRUE, (iop= &tmp_io))))
goto fail;
}
@@ -3006,13 +3018,13 @@ int ha_federatedx::info(uint flag)
if (flag & HA_STATUS_CONST)
stats.block_size= 4096;
- if (tmp_io->table_metadata(&stats, share->table_name,
+ if ((*iop)->table_metadata(&stats, share->table_name,
share->table_name_length, flag))
goto error;
}
if (flag & HA_STATUS_AUTO)
- stats.auto_increment_value= tmp_io->last_insert_id();
+ stats.auto_increment_value= (*iop)->last_insert_id();
/*
If ::info created it's own transaction, close it. This happens in case
@@ -3023,10 +3035,10 @@ int ha_federatedx::info(uint flag)
DBUG_RETURN(0);
error:
- if (tmp_io)
+ if (iop && *iop)
{
my_sprintf(error_buffer, (error_buffer, ": %d : %s",
- tmp_io->error_code(), tmp_io->error_str()));
+ (*iop)->error_code(), (*iop)->error_str()));
my_error(error_code, MYF(0), error_buffer);
}
else
=== modified file 'storage/ndb/plug.in'
--- a/storage/ndb/plug.in 2006-08-19 04:19:19 +0000
+++ b/storage/ndb/plug.in 2009-12-27 13:54:41 +0000
@@ -1,5 +1,5 @@
MYSQL_STORAGE_ENGINE(ndbcluster, ndbcluster, [Cluster Storage Engine],
- [High Availability Clustered tables], [max])
+ [High Availability Clustered tables],)
MYSQL_PLUGIN_DIRECTORY(ndbcluster,[storage/ndb])
MYSQL_PLUGIN_STATIC(ndbcluster, [[\$(ndbcluster_libs) \$(ndbcluster_system_libs) \$(NDB_SCI_LIBS)]])
MYSQL_PLUGIN_ACTIONS(ndbcluster,[MYSQL_SETUP_NDBCLUSTER])
=== modified file 'storage/pbxt/ChangeLog'
--- a/storage/pbxt/ChangeLog 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/ChangeLog 2009-12-01 09:50:46 +0000
@@ -1,6 +1,58 @@
PBXT Release Notes
==================
+------- 1.0.09f RC3 - 2009-11-30
+
+RN291: Fixed bug #489088: On shutdown MySQL reports: [Warning] Plugin 'PBXT' will be forced to shutdown.
+
+RN290: Fixed bug #345524: pbxt does not compile on 64 bit windows. Currently atomic operations are not supported on this platform.
+
+RN286: Fixed a bug introduced in RN281, which could cause an index scan to hang. The original change was to prevent a warning in Valgrind.
+
+RN285: Merged changes required to compile with Drizzle.
+
+RN284: Fixed bug that cause the error "[ERROR] Invalid (old?) table or database name 'mysqld.1'", when running temp_table.test under MariaDB (thanks to Monty for his initial bug fix). Added a fix for partition table names as well.
+
+RN283: Added win_inttypes.h to the distribution. This file is only required for the Windows build.
+
+RN282: Fixed bug #451101: jump or move depends on uninitialised value in myxt_get_key_length
+
+RN281: Fixed bug #451080: Uninitialised memory write in XTDatabaseLog::xlog_append
+
+RN280: Fixed bug #451085: jump or move depends on uninitialised value in my_type_to_string
+
+RN279: Fixed bug #441000: xtstat crashes with segmentation fault on startup if max_pbxt_threads exceeded.
+
+------- 1.0.09e RC3 - 2009-11-20
+
+RN278: Fixed compile error with MySQL 5.1.41.
+
+------- 1.0.09d RC3 - 2009-09-30
+
+RN277: Added r/o flag to pbxt_max_threads server variable (this fix is related to bug #430637)
+
+RN276: Added test case for replication on tables w/o PKs (see bug #430716)
+
+RN275: Fixed bug #430600: 'Failed to read auto-increment value from storage engine' error.
+
+RN274: Fixed bug #431240: This report is public edit xtstat fails if no PBXT table has been created. xtstat now accepts --database=information_schema or --database=pbxt. Depending on this setting PBXT will either use the information_schema.pbxt_statistics or the pbxt.statistics table. If information_schema is used, then the statistics are displayed even when no PBXT table exists. Recovery activity is also displayed, unless pbxt_support_xa=1, in which case MySQL will wait for PBXT recovery to complete before allowing connections.
+
+RN273: Fixed bug #430633: XA_RBDEADLOCK is not returned on XA END after the transacting ended with a deadlock.
+
+RN272: Fixed bug #430596: Backup/restore does not work well even on a basic PBXT table with auto-increment.
+
+------- 1.0.09c RC3 - 2009-09-16
+
+RN271: Windows build update: now you can simply put the pbxt directory under <mysql-root>/storage and build the PBXT engine as a part of the source tree. The engine will be linked statically. Be sure to specify the WITH_PBXT_STORAGE_ENGINE option when running win\configure.js
+
+RN270: Correctly disabled PBMS so that this version now compiles under Windows. If PBMS_ENABLED is defined, PBXT will not compile under Windows becaause of a getpid() call in pbms.h.
+
+------- 1.0.09 RC3 - 2009-09-09
+
+RN269: Implemented online backup. A native online backup driver now performs BACKUP and RESTORE DATABASE operations for PBXT. NOTE: This feature is only supported by MySQL 6.0.9 or later.
+
+RN268: Implemented XA support. PBXT now supports all XA related MySQL statements. The variable pbxt_support_xa determines if XA support is enabled. Note: due to MySQL bug #47134, enabling XA support could lead to a crash.
+
------- 1.0.08d RC2 - 2009-09-02
RN267: Fixed a bug that caused MySQL to crash on shutdown, after an incorrect command line parameter was given. The crash occurred because the background recovery task was not cleaned up before the PBXT engine was de-initialized.
=== modified file 'storage/pbxt/src/Makefile.am'
--- a/storage/pbxt/src/Makefile.am 2009-10-07 07:40:56 +0000
+++ b/storage/pbxt/src/Makefile.am 2009-11-24 10:55:06 +0000
@@ -22,7 +22,7 @@ noinst_HEADERS = bsearch_xt.h cache_xt.
pbms_enabled.h sortedlist_xt.h strutil_xt.h \
tabcache_xt.h table_xt.h trace_xt.h thread_xt.h \
util_xt.h xaction_xt.h xactlog_xt.h lock_xt.h \
- systab_xt.h ha_xtsys.h discover_xt.h \
+ systab_xt.h ha_xtsys.h discover_xt.h backup_xt.h \
pbms.h xt_config.h xt_defs.h xt_errno.h locklist_xt.h
EXTRA_LTLIBRARIES = libpbxt.la
@@ -32,7 +32,7 @@ libpbxt_la_SOURCES = bsearch_xt.cc cache
memory_xt.cc myxt_xt.cc pthread_xt.cc restart_xt.cc \
sortedlist_xt.cc strutil_xt.cc \
tabcache_xt.cc table_xt.cc trace_xt.cc thread_xt.cc \
- systab_xt.cc ha_xtsys.cc discover_xt.cc \
+ systab_xt.cc ha_xtsys.cc discover_xt.cc backup_xt.cc \
util_xt.cc xaction_xt.cc xactlog_xt.cc lock_xt.cc locklist_xt.cc
libpbxt_la_LDFLAGS = -module
=== added file 'storage/pbxt/src/backup_xt.cc'
--- a/storage/pbxt/src/backup_xt.cc 1970-01-01 00:00:00 +0000
+++ b/storage/pbxt/src/backup_xt.cc 2009-11-24 10:55:06 +0000
@@ -0,0 +1,802 @@
+/* Copyright (c) 2009 PrimeBase Technologies GmbH
+ *
+ * PrimeBase XT
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * 2009-09-07 Paul McCullagh
+ *
+ * H&G2JCtL
+ */
+
+#include "xt_config.h"
+
+#ifdef MYSQL_SUPPORTS_BACKUP
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <ctype.h>
+
+#include "mysql_priv.h"
+#include <backup/api_types.h>
+#include <backup/backup_engine.h>
+#include <backup/backup_aux.h> // for build_table_list()
+#include <hash.h>
+
+#include "ha_pbxt.h"
+
+#include "backup_xt.h"
+#include "pthread_xt.h"
+#include "filesys_xt.h"
+#include "database_xt.h"
+#include "strutil_xt.h"
+#include "memory_xt.h"
+#include "trace_xt.h"
+#include "myxt_xt.h"
+
+#ifdef OK
+#undef OK
+#endif
+
+#ifdef byte
+#undef byte
+#endif
+
+#ifdef DEBUG
+//#define TRACE_BACKUP_CALLS
+//#define TEST_SMALL_BLOCK 100000
+#endif
+
+using backup::byte;
+using backup::result_t;
+using backup::version_t;
+using backup::Table_list;
+using backup::Table_ref;
+using backup::Buffer;
+
+#ifdef TRACE_BACKUP_CALLS
+#define XT_TRACE_CALL() ha_trace_function(__FUNC__, NULL)
+#else
+#define XT_TRACE_CALL()
+#endif
+
+#define XT_RESTORE_BATCH_SIZE 10000
+
+#define BUP_STATE_BEFORE_LOCK 0
+#define BUP_STATE_AFTER_LOCK 1
+
+#define BUP_STANDARD_VAR_RECORD 1
+#define BUP_RECORD_BLOCK_4_START 2 // Part of a record, with a 4 byte total length, and 4 byte data length
+#define BUP_RECORD_BLOCK_4 3 // Part of a record, with a 4 byte length
+#define BUP_RECORD_BLOCK_4_END 4 // Last part of a record with a 4 byte length
+
+/*
+ * -----------------------------------------------------------------------
+ * UTILITIES
+ */
+
+#ifdef TRACE_BACKUP_CALLS
+static void ha_trace_function(const char *function, char *table)
+{
+ char func_buf[50], *ptr;
+ XTThreadPtr thread = xt_get_self();
+
+ if ((ptr = strchr(function, '('))) {
+ ptr--;
+ while (ptr > function) {
+ if (!(isalnum(*ptr) || *ptr == '_'))
+ break;
+ ptr--;
+ }
+ ptr++;
+ xt_strcpy(50, func_buf, ptr);
+ if ((ptr = strchr(func_buf, '(')))
+ *ptr = 0;
+ }
+ else
+ xt_strcpy(50, func_buf, function);
+ if (table)
+ printf("%s %s (%s)\n", thread ? thread->t_name : "-unknown-", func_buf, table);
+ else
+ printf("%s %s\n", thread ? thread->t_name : "-unknown-", func_buf);
+}
+#endif
+
+/*
+ * -----------------------------------------------------------------------
+ * BACKUP DRIVER
+ */
+
+class PBXTBackupDriver: public Backup_driver
+{
+ public:
+ PBXTBackupDriver(const Table_list &);
+ virtual ~PBXTBackupDriver();
+
+ virtual size_t size();
+ virtual size_t init_size();
+ virtual result_t begin(const size_t);
+ virtual result_t end();
+ virtual result_t get_data(Buffer &);
+ virtual result_t prelock();
+ virtual result_t lock();
+ virtual result_t unlock();
+ virtual result_t cancel();
+ virtual void free();
+ void lock_tables_TL_READ_NO_INSERT();
+
+ private:
+ XTThreadPtr bd_thread;
+ int bd_state;
+ u_int bd_table_no;
+ XTOpenTablePtr bd_ot;
+ xtWord1 *bd_row_buf;
+
+ /* Non-zero if we last returned only part of
+ * a row.
+ */
+ xtWord1 *db_write_block(xtWord1 *buffer, xtWord1 bup_type, size_t *size, xtWord4 row_len);
+ xtWord1 *db_write_block(xtWord1 *buffer, xtWord1 bup_type, size_t *size, xtWord4 total_len, xtWord4 row_len);
+
+ xtWord4 bd_row_offset;
+ xtWord4 bd_row_size;
+};
+
+
+PBXTBackupDriver::PBXTBackupDriver(const Table_list &tables):
+Backup_driver(tables),
+bd_state(BUP_STATE_BEFORE_LOCK),
+bd_table_no(0),
+bd_ot(NULL),
+bd_row_buf(NULL),
+bd_row_offset(0),
+bd_row_size(0)
+{
+}
+
+PBXTBackupDriver::~PBXTBackupDriver()
+{
+}
+
+/** Estimates total size of backup. @todo improve it */
+size_t PBXTBackupDriver::size()
+{
+ XT_TRACE_CALL();
+ return UNKNOWN_SIZE;
+}
+
+/** Estimates size of backup before lock. @todo improve it */
+size_t PBXTBackupDriver::init_size()
+{
+ XT_TRACE_CALL();
+ return 0;
+}
+
+result_t PBXTBackupDriver::begin(const size_t)
+{
+ THD *thd = current_thd;
+ XTExceptionRec e;
+
+ XT_TRACE_CALL();
+
+ if (!(bd_thread = xt_ha_set_current_thread(thd, &e))) {
+ xt_log_exception(NULL, &e, XT_LOG_DEFAULT);
+ return backup::ERROR;
+ }
+
+ return backup::OK;
+}
+
+result_t PBXTBackupDriver::end()
+{
+ XT_TRACE_CALL();
+ if (bd_ot) {
+ xt_tab_seq_exit(bd_ot);
+ xt_db_return_table_to_pool_ns(bd_ot);
+ bd_ot = NULL;
+ }
+ if (bd_thread->st_xact_data) {
+ if (!xt_xn_commit(bd_thread))
+ return backup::ERROR;
+ }
+ return backup::OK;
+}
+
+xtWord1 *PBXTBackupDriver::db_write_block(xtWord1 *buffer, xtWord1 bup_type, size_t *ret_size, xtWord4 row_len)
+{
+ register size_t size = *ret_size;
+
+ *buffer = bup_type; // Record type identifier.
+ buffer++;
+ size--;
+ memcpy(buffer, bd_ot->ot_row_wbuffer, row_len);
+ buffer += row_len;
+ size -= row_len;
+ *ret_size = size;
+ return buffer;
+}
+
+xtWord1 *PBXTBackupDriver::db_write_block(xtWord1 *buffer, xtWord1 bup_type, size_t *ret_size, xtWord4 total_len, xtWord4 row_len)
+{
+ register size_t size = *ret_size;
+
+ *buffer = bup_type; // Record type identifier.
+ buffer++;
+ size--;
+ if (bup_type == BUP_RECORD_BLOCK_4_START) {
+ XT_SET_DISK_4(buffer, total_len);
+ buffer += 4;
+ size -= 4;
+ }
+ XT_SET_DISK_4(buffer, row_len);
+ buffer += 4;
+ size -= 4;
+ memcpy(buffer, bd_ot->ot_row_wbuffer+bd_row_offset, row_len);
+ buffer += row_len;
+ size -= row_len;
+ bd_row_size -= row_len;
+ bd_row_offset += row_len;
+ *ret_size = size;
+ return buffer;
+}
+
+result_t PBXTBackupDriver::get_data(Buffer &buf)
+{
+ xtBool eof = FALSE;
+ size_t size;
+ xtWord4 row_len;
+ xtWord1 *buffer;
+
+ XT_TRACE_CALL();
+
+ if (bd_state == BUP_STATE_BEFORE_LOCK) {
+ buf.table_num = 0;
+ buf.size = 0;
+ buf.last = FALSE;
+ return backup::READY;
+ }
+
+ /* Open the backup table: */
+ if (!bd_ot) {
+ XTThreadPtr self = bd_thread;
+ XTTableHPtr tab;
+ char path[PATH_MAX];
+
+ if (bd_table_no == m_tables.count()) {
+ buf.size = 0;
+ buf.table_num = 0;
+ buf.last = TRUE;
+ return backup::DONE;
+ }
+
+ m_tables[bd_table_no].internal_name(path, sizeof(path));
+ bd_table_no++;
+ try_(a) {
+ xt_ha_open_database_of_table(self, (XTPathStrPtr) path);
+ tab = xt_use_table(self, (XTPathStrPtr) path, FALSE, FALSE, NULL);
+ pushr_(xt_heap_release, tab);
+ if (!(bd_ot = xt_db_open_table_using_tab(tab, bd_thread)))
+ xt_throw(self);
+ freer_(); // xt_heap_release(tab)
+
+ /* Prepare the seqential scan: */
+ xt_tab_seq_exit(bd_ot);
+ if (!xt_tab_seq_init(bd_ot))
+ xt_throw(self);
+
+ if (bd_row_buf) {
+ xt_free(self, bd_row_buf);
+ bd_row_buf = NULL;
+ }
+ bd_row_buf = (xtWord1 *) xt_malloc(self, bd_ot->ot_table->tab_dic.dic_mysql_buf_size);
+ bd_ot->ot_cols_req = bd_ot->ot_table->tab_dic.dic_no_of_cols;
+ }
+ catch_(a) {
+ ;
+ }
+ cont_(a);
+
+ if (!bd_ot)
+ goto failed;
+ }
+
+ buf.table_num = bd_table_no;
+#ifdef TEST_SMALL_BLOCK
+ buf.size = TEST_SMALL_BLOCK;
+#endif
+ size = buf.size;
+ buffer = (xtWord1 *) buf.data;
+ ASSERT_NS(size > 9);
+
+ /* First check of a record was partically written
+ * last time.
+ */
+ write_row:
+ if (bd_row_size > 0) {
+ row_len = bd_row_size;
+ if (bd_row_offset == 0) {
+ if (row_len+1 > size) {
+ ASSERT_NS(size > 9);
+ row_len = size - 9;
+ buffer = db_write_block(buffer, BUP_RECORD_BLOCK_4_START, &size, bd_row_size, row_len);
+ goto done;
+ }
+ buffer = db_write_block(buffer, BUP_STANDARD_VAR_RECORD, &size, row_len);
+ bd_row_size = 0;
+ }
+ else {
+ if (row_len+5 > size) {
+ row_len = size - 5;
+ buffer = db_write_block(buffer, BUP_RECORD_BLOCK_4, &size, 0, row_len);
+ goto done;
+ }
+ buffer = db_write_block(buffer, BUP_RECORD_BLOCK_4_END, &size, 0, row_len);
+ }
+ }
+
+ /* Now continue with the sequential scan. */
+ while (size > 1) {
+ if (!xt_tab_seq_next(bd_ot, bd_row_buf, &eof))
+ goto failed;
+ if (eof) {
+ /* We will go the next table, on the next call. */
+ xt_tab_seq_exit(bd_ot);
+ xt_db_return_table_to_pool_ns(bd_ot);
+ bd_ot = NULL;
+ break;
+ }
+ if (!(row_len = myxt_store_row_data(bd_ot, 0, (char *) bd_row_buf)))
+ goto failed;
+ if (row_len+1 > size) {
+ /* Does not fit: */
+ bd_row_offset = 0;
+ bd_row_size = row_len;
+ /* Only add part of the row, if there is still
+ * quite a bit of space left:
+ */
+ if (size >= (32 * 1024))
+ goto write_row;
+ break;
+ }
+ buffer = db_write_block(buffer, BUP_STANDARD_VAR_RECORD, &size, row_len);
+ }
+
+ done:
+ buf.size = buf.size - size;
+ /* This indicates wnd of data for a table! */
+ buf.last = eof;
+
+ return backup::OK;
+
+ failed:
+ xt_log_and_clear_exception(bd_thread);
+ return backup::ERROR;
+}
+
+result_t PBXTBackupDriver::prelock()
+{
+ XT_TRACE_CALL();
+ return backup::READY;
+}
+
+result_t PBXTBackupDriver::lock()
+{
+ XT_TRACE_CALL();
+ bd_thread->st_xact_mode = XT_XACT_COMMITTED_READ;
+ bd_thread->st_ignore_fkeys = FALSE;
+ bd_thread->st_auto_commit = FALSE;
+ bd_thread->st_table_trans = FALSE;
+ bd_thread->st_abort_trans = FALSE;
+ bd_thread->st_stat_ended = FALSE;
+ bd_thread->st_stat_trans = FALSE;
+ bd_thread->st_is_update = FALSE;
+ if (!xt_xn_begin(bd_thread))
+ return backup::ERROR;
+ bd_state = BUP_STATE_AFTER_LOCK;
+ return backup::OK;
+}
+
+result_t PBXTBackupDriver::unlock()
+{
+ XT_TRACE_CALL();
+ return backup::OK;
+}
+
+result_t PBXTBackupDriver::cancel()
+{
+ XT_TRACE_CALL();
+ return backup::OK; // free() will be called and suffice
+}
+
+void PBXTBackupDriver::free()
+{
+ XT_TRACE_CALL();
+ if (bd_ot) {
+ xt_tab_seq_exit(bd_ot);
+ xt_db_return_table_to_pool_ns(bd_ot);
+ bd_ot = NULL;
+ }
+ if (bd_row_buf) {
+ xt_free_ns(bd_row_buf);
+ bd_row_buf = NULL;
+ }
+ if (bd_thread->st_xact_data)
+ xt_xn_rollback(bd_thread);
+ delete this;
+}
+
+void PBXTBackupDriver::lock_tables_TL_READ_NO_INSERT()
+{
+ XT_TRACE_CALL();
+}
+
+/*
+ * -----------------------------------------------------------------------
+ * BACKUP DRIVER
+ */
+
+class PBXTRestoreDriver: public Restore_driver
+{
+ public:
+ PBXTRestoreDriver(const Table_list &tables);
+ virtual ~PBXTRestoreDriver();
+
+ virtual result_t begin(const size_t);
+ virtual result_t end();
+ virtual result_t send_data(Buffer &buf);
+ virtual result_t cancel();
+ virtual void free();
+
+ private:
+ XTThreadPtr rd_thread;
+ u_int rd_table_no;
+ XTOpenTablePtr rd_ot;
+ STRUCT_TABLE *rd_my_table;
+ xtWord1 *rb_row_buf;
+ u_int rb_col_cnt;
+ u_int rb_insert_count;
+
+ /* Long rows are accumulated here: */
+ xtWord4 rb_row_len;
+ xtWord4 rb_data_size;
+ xtWord1 *rb_row_data;
+};
+
+PBXTRestoreDriver::PBXTRestoreDriver(const Table_list &tables):
+Restore_driver(tables),
+rd_thread(NULL),
+rd_table_no(0),
+rd_ot(NULL),
+rb_row_buf(NULL),
+rb_row_len(0),
+rb_data_size(0),
+rb_row_data(NULL)
+{
+}
+
+PBXTRestoreDriver::~PBXTRestoreDriver()
+{
+}
+
+result_t PBXTRestoreDriver::begin(const size_t)
+{
+ THD *thd = current_thd;
+ XTExceptionRec e;
+
+ XT_TRACE_CALL();
+
+ if (!(rd_thread = xt_ha_set_current_thread(thd, &e))) {
+ xt_log_exception(NULL, &e, XT_LOG_DEFAULT);
+ return backup::ERROR;
+ }
+
+ return backup::OK;
+}
+
+result_t PBXTRestoreDriver::end()
+{
+ XT_TRACE_CALL();
+ if (rd_ot) {
+ xt_db_return_table_to_pool_ns(rd_ot);
+ rd_ot = NULL;
+ }
+ //if (rb_row_buf) {
+ // xt_free_ns(rb_row_buf);
+ // rb_row_buf = NULL;
+ //}
+ if (rb_row_data) {
+ xt_free_ns(rb_row_data);
+ rb_row_data = NULL;
+ }
+ if (rd_thread->st_xact_data) {
+ if (!xt_xn_commit(rd_thread))
+ return backup::ERROR;
+ }
+ return backup::OK;
+}
+
+
+result_t PBXTRestoreDriver::send_data(Buffer &buf)
+{
+ size_t size;
+ xtWord1 type;
+ xtWord1 *buffer;
+ xtWord4 row_len;
+ xtWord1 *rec_data;
+
+ XT_TRACE_CALL();
+
+ if (buf.table_num != rd_table_no) {
+ XTThreadPtr self = rd_thread;
+ XTTableHPtr tab;
+ char path[PATH_MAX];
+
+ if (rd_ot) {
+ xt_db_return_table_to_pool_ns(rd_ot);
+ rd_ot = NULL;
+ }
+
+ if (rd_thread->st_xact_data) {
+ if (!xt_xn_commit(rd_thread))
+ goto failed;
+ }
+ if (!xt_xn_begin(rd_thread))
+ goto failed;
+ rb_insert_count = 0;
+
+ rd_table_no = buf.table_num;
+ m_tables[rd_table_no-1].internal_name(path, sizeof(path));
+ try_(a) {
+ xt_ha_open_database_of_table(self, (XTPathStrPtr) path);
+ tab = xt_use_table(self, (XTPathStrPtr) path, FALSE, FALSE, NULL);
+ pushr_(xt_heap_release, tab);
+ if (!(rd_ot = xt_db_open_table_using_tab(tab, rd_thread)))
+ xt_throw(self);
+ freer_(); // xt_heap_release(tab)
+
+ rd_my_table = rd_ot->ot_table->tab_dic.dic_my_table;
+ if (rd_my_table->found_next_number_field) {
+ rd_my_table->in_use = current_thd;
+ rd_my_table->next_number_field = rd_my_table->found_next_number_field;
+ rd_my_table->mark_columns_used_by_index_no_reset(rd_my_table->s->next_number_index, rd_my_table->read_set);
+ }
+
+ /* This is safe because only one thread can restore a table at
+ * a time!
+ */
+ rb_row_buf = (xtWord1 *) rd_my_table->record[0];
+ //if (rb_row_buf) {
+ // xt_free(self, rb_row_buf);
+ // rb_row_buf = NULL;
+ //}
+ //rb_row_buf = (xtWord1 *) xt_malloc(self, rd_ot->ot_table->tab_dic.dic_mysql_buf_size);
+
+ rb_col_cnt = rd_ot->ot_table->tab_dic.dic_no_of_cols;
+
+ }
+ catch_(a) {
+ ;
+ }
+ cont_(a);
+
+ if (!rd_ot)
+ goto failed;
+ }
+
+ buffer = (xtWord1 *) buf.data;
+ size = buf.size;
+
+ while (size > 0) {
+ type = *buffer;
+ switch (type) {
+ case BUP_STANDARD_VAR_RECORD:
+ rec_data = buffer + 1;
+ break;
+ case BUP_RECORD_BLOCK_4_START:
+ buffer++;
+ row_len = XT_GET_DISK_4(buffer);
+ buffer += 4;
+ if (rb_data_size < row_len) {
+ if (!xt_realloc_ns((void **) &rb_row_data, row_len))
+ goto failed;
+ rb_data_size = row_len;
+ }
+ row_len = XT_GET_DISK_4(buffer);
+ buffer += 4;
+ ASSERT_NS(row_len <= rb_data_size);
+ if (row_len > rb_data_size) {
+ xt_register_xterr(XT_REG_CONTEXT, XT_ERR_BAD_BACKUP_FORMAT);
+ goto failed;
+ }
+ memcpy(rb_row_data, buffer, row_len);
+ rb_row_len = row_len;
+ buffer += row_len;
+ if (row_len + 9 > size) {
+ xt_register_xterr(XT_REG_CONTEXT, XT_ERR_BAD_BACKUP_FORMAT);
+ goto failed;
+ }
+ size -= row_len + 9;
+ continue;
+ case BUP_RECORD_BLOCK_4:
+ buffer++;
+ row_len = XT_GET_DISK_4(buffer);
+ buffer += 4;
+ ASSERT_NS(rb_row_len + row_len <= rb_data_size);
+ if (rb_row_len + row_len > rb_data_size) {
+ xt_register_xterr(XT_REG_CONTEXT, XT_ERR_BAD_BACKUP_FORMAT);
+ goto failed;
+ }
+ memcpy(rb_row_data + rb_row_len, buffer, row_len);
+ rb_row_len += row_len;
+ buffer += row_len;
+ if (row_len + 5 > size) {
+ xt_register_xterr(XT_REG_CONTEXT, XT_ERR_BAD_BACKUP_FORMAT);
+ goto failed;
+ }
+ size -= row_len + 5;
+ continue;
+ case BUP_RECORD_BLOCK_4_END:
+ buffer++;
+ row_len = XT_GET_DISK_4(buffer);
+ buffer += 4;
+ ASSERT_NS(rb_row_len + row_len <= rb_data_size);
+ if (rb_row_len + row_len > rb_data_size) {
+ xt_register_xterr(XT_REG_CONTEXT, XT_ERR_BAD_BACKUP_FORMAT);
+ goto failed;
+ }
+ memcpy(rb_row_data + rb_row_len, buffer, row_len);
+ buffer += row_len;
+ if (row_len + 5 > size) {
+ xt_register_xterr(XT_REG_CONTEXT, XT_ERR_BAD_BACKUP_FORMAT);
+ goto failed;
+ }
+ size -= row_len + 5;
+ rec_data = rb_row_data;
+ break;
+ default:
+ xt_register_xterr(XT_REG_CONTEXT, XT_ERR_BAD_BACKUP_FORMAT);
+ goto failed;
+ }
+
+ if (!(row_len = myxt_load_row_data(rd_ot, rec_data, rb_row_buf, rb_col_cnt)))
+ goto failed;
+
+ if (rd_ot->ot_table->tab_dic.dic_my_table->found_next_number_field)
+ ha_set_auto_increment(rd_ot, rd_ot->ot_table->tab_dic.dic_my_table->found_next_number_field);
+
+ if (!xt_tab_new_record(rd_ot, rb_row_buf))
+ goto failed;
+
+ if (type == BUP_STANDARD_VAR_RECORD) {
+ buffer += row_len+1;
+ if (row_len + 1 > size) {
+ xt_register_xterr(XT_REG_CONTEXT, XT_ERR_BAD_BACKUP_FORMAT);
+ goto failed;
+ }
+ size -= row_len + 1;
+ }
+
+ rb_insert_count++;
+ if (rb_insert_count == XT_RESTORE_BATCH_SIZE) {
+ if (!xt_xn_commit(rd_thread))
+ goto failed;
+ if (!xt_xn_begin(rd_thread))
+ goto failed;
+ rb_insert_count = 0;
+ }
+ }
+
+ return backup::OK;
+
+ failed:
+ xt_log_and_clear_exception(rd_thread);
+ return backup::ERROR;
+}
+
+
+result_t PBXTRestoreDriver::cancel()
+{
+ XT_TRACE_CALL();
+ /* Nothing to do in cancel(); free() will suffice */
+ return backup::OK;
+}
+
+void PBXTRestoreDriver::free()
+{
+ XT_TRACE_CALL();
+ if (rd_ot) {
+ xt_db_return_table_to_pool_ns(rd_ot);
+ rd_ot = NULL;
+ }
+ //if (rb_row_buf) {
+ // xt_free_ns(rb_row_buf);
+ // rb_row_buf = NULL;
+ //}
+ if (rb_row_data) {
+ xt_free_ns(rb_row_data);
+ rb_row_data = NULL;
+ }
+ if (rd_thread->st_xact_data)
+ xt_xn_rollback(rd_thread);
+ delete this;
+}
+
+/*
+ * -----------------------------------------------------------------------
+ * BACKUP ENGINE FACTORY
+ */
+
+#define PBXT_BACKUP_VERSION 1
+
+
+class PBXTBackupEngine: public Backup_engine
+{
+ public:
+ PBXTBackupEngine() { };
+
+ virtual version_t version() const {
+ return PBXT_BACKUP_VERSION;
+ };
+
+ virtual result_t get_backup(const uint32, const Table_list &, Backup_driver* &);
+
+ virtual result_t get_restore(const version_t, const uint32, const Table_list &,Restore_driver* &);
+
+ virtual void free()
+ {
+ delete this;
+ }
+};
+
+result_t PBXTBackupEngine::get_backup(const u_int count, const Table_list &tables, Backup_driver* &drv)
+{
+ PBXTBackupDriver *ptr = new PBXTBackupDriver(tables);
+
+ if (!ptr)
+ return backup::ERROR;
+ drv = ptr;
+ return backup::OK;
+}
+
+result_t PBXTBackupEngine::get_restore(const version_t ver, const uint32,
+ const Table_list &tables, Restore_driver* &drv)
+{
+ if (ver > PBXT_BACKUP_VERSION)
+ {
+ return backup::ERROR;
+ }
+
+ PBXTRestoreDriver *ptr = new PBXTRestoreDriver(tables);
+
+ if (!ptr)
+ return backup::ERROR;
+ drv = (Restore_driver *) ptr;
+ return backup::OK;
+}
+
+
+Backup_result_t pbxt_backup_engine(handlerton *self, Backup_engine* &be)
+{
+ be = new PBXTBackupEngine();
+
+ if (!be)
+ return backup::ERROR;
+
+ return backup::OK;
+}
+
+#endif
=== added file 'storage/pbxt/src/backup_xt.h'
--- a/storage/pbxt/src/backup_xt.h 1970-01-01 00:00:00 +0000
+++ b/storage/pbxt/src/backup_xt.h 2009-11-24 10:55:06 +0000
@@ -0,0 +1,34 @@
+/* Copyright (c) 2009 PrimeBase Technologies GmbH
+ *
+ * PrimeBase XT
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * 2009-09-07 Paul McCullagh
+ *
+ * H&G2JCtL
+ */
+
+#ifndef __backup_xt_h__
+#define __backup_xt_h__
+
+#include "xt_defs.h"
+
+#ifdef MYSQL_SUPPORTS_BACKUP
+
+Backup_result_t pbxt_backup_engine(handlerton *self, Backup_engine* &be);
+
+#endif
+#endif
=== modified file 'storage/pbxt/src/cache_xt.cc'
--- a/storage/pbxt/src/cache_xt.cc 2009-10-30 18:50:56 +0000
+++ b/storage/pbxt/src/cache_xt.cc 2009-11-24 10:55:06 +0000
@@ -73,7 +73,7 @@
#define IDX_CAC_UNLOCK(i, o) xt_xsmutex_unlock(&(i)->cs_lock, (o)->t_id)
#elif defined(IDX_CAC_USE_PTHREAD_RW)
#define IDX_CAC_LOCK_TYPE xt_rwlock_type
-#define IDX_CAC_INIT_LOCK(s, i) xt_init_rwlock(s, &(i)->cs_lock)
+#define IDX_CAC_INIT_LOCK(s, i) xt_init_rwlock_with_autoname(s, &(i)->cs_lock)
#define IDX_CAC_FREE_LOCK(s, i) xt_free_rwlock(&(i)->cs_lock)
#define IDX_CAC_READ_LOCK(i, o) xt_slock_rwlock_ns(&(i)->cs_lock)
#define IDX_CAC_WRITE_LOCK(i, o) xt_xlock_rwlock_ns(&(i)->cs_lock)
@@ -94,8 +94,12 @@
#define IDX_CAC_UNLOCK(i, s) xt_spinxslock_unlock(&(i)->cs_lock, (s)->t_id)
#endif
+#ifdef XT_NO_ATOMICS
+#define ID_HANDLE_USE_PTHREAD_RW
+#else
#define ID_HANDLE_USE_SPINLOCK
//#define ID_HANDLE_USE_PTHREAD_RW
+#endif
#if defined(ID_HANDLE_USE_PTHREAD_RW)
#define ID_HANDLE_LOCK_TYPE xt_mutex_type
@@ -374,7 +378,7 @@ xtPublic void xt_ind_release_handle(XTIn
{
DcHandleSlotPtr hs;
XTIndBlockPtr block = NULL;
- u_int hash_idx = 0;
+ u_int hash_idx = 0;
DcSegmentPtr seg = NULL;
XTIndBlockPtr xblock;
@@ -1379,7 +1383,7 @@ xtPublic xtBool xt_ind_fetch(XTOpenTable
ASSERT_NS(iref->ir_xlock == 2);
#endif
if (!(block = ind_cac_fetch(ot, ind, address, &seg, TRUE)))
- return 0;
+ return FAILED;
branch_size = XT_GET_DISK_2(((XTIdxBranchDPtr) block->cb_data)->tb_size_2);
if (XT_GET_INDEX_BLOCK_LEN(branch_size) < 2 || XT_GET_INDEX_BLOCK_LEN(branch_size) > XT_INDEX_PAGE_SIZE) {
=== modified file 'storage/pbxt/src/cache_xt.h'
--- a/storage/pbxt/src/cache_xt.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/cache_xt.h 2009-11-24 10:55:06 +0000
@@ -62,7 +62,7 @@ struct XTIdxReadBuffer;
#define XT_IPAGE_UNLOCK(i, x) xt_atomicrwlock_unlock(i, x)
#elif defined(XT_IPAGE_USE_PTHREAD_RW)
#define XT_IPAGE_LOCK_TYPE xt_rwlock_type
-#define XT_IPAGE_INIT_LOCK(s, i) xt_init_rwlock(s, i)
+#define XT_IPAGE_INIT_LOCK(s, i) xt_init_rwlock_with_autoname(s, i)
#define XT_IPAGE_FREE_LOCK(s, i) xt_free_rwlock(i)
#define XT_IPAGE_READ_LOCK(i) xt_slock_rwlock_ns(i)
#define XT_IPAGE_WRITE_LOCK(i, s) xt_xlock_rwlock_ns(i)
=== modified file 'storage/pbxt/src/database_xt.cc'
--- a/storage/pbxt/src/database_xt.cc 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/database_xt.cc 2009-11-24 10:55:06 +0000
@@ -54,6 +54,8 @@
* GLOBALS
*/
+xtPublic XTDatabaseHPtr pbxt_database = NULL; // The global open database
+
xtPublic xtLogOffset xt_db_log_file_threshold;
xtPublic size_t xt_db_log_buffer_size;
xtPublic size_t xt_db_transaction_buffer_size;
@@ -505,6 +507,15 @@ xtPublic XTDatabaseHPtr xt_get_database(
* all index entries that are not visible have
* been removed.
*
+ * REASON WHY WE SET ROWID ON RECOVERY:
+ * The row ID is set on recovery because the
+ * change to the index may be lost after a crash.
+ * The change to the index is done by the sweeper, and
+ * there is no record of this change in the log.
+ * The sweeper will not "re-sweep" all transations
+ * that are recovered. As a result, this upadte
+ * of the index by the sweeper may be lost.
+ *
* {OPEN-DB-SWEEPER-WAIT}
* This has been moved to after the release of the open
* database lock because:
@@ -518,9 +529,12 @@ xtPublic XTDatabaseHPtr xt_get_database(
* - To open the database it needs the open database
* lock.
*/
+ /*
+ * This has been moved, see: {WAIT-FOR-SW-AFTER-RECOV}
pushr_(xt_heap_release, db);
xt_wait_for_sweeper(self, db, 0);
popr_();
+ */
return db;
}
=== modified file 'storage/pbxt/src/database_xt.h'
--- a/storage/pbxt/src/database_xt.h 2009-04-02 10:03:14 +0000
+++ b/storage/pbxt/src/database_xt.h 2009-11-24 10:55:06 +0000
@@ -105,6 +105,8 @@ typedef struct XTTablePath {
#define XT_THREAD_IDLE 1
#define XT_THREAD_INERR 2
+#define XT_XA_HASH_TAB_SIZE 223
+
typedef struct XTDatabase : public XTHeap {
char *db_name; /* The name of the database, last component of the path! */
char *db_main_path;
@@ -131,6 +133,9 @@ typedef struct XTDatabase : public XTHea
u_int db_stat_sweep_waits; /* STATISTICS: count the sweeper waits. */
XTDatabaseLogRec db_xlog; /* The transaction log for this database. */
XTXactRestartRec db_restart; /* Database recovery stuff. */
+ xt_mutex_type db_xn_xa_lock;
+ XTXactPreparePtr db_xn_xa_table[XT_XA_HASH_TAB_SIZE];
+ XTSortedListPtr db_xn_xa_list; /* The "wait-for" list, of transactions waiting for other transactions. */
XTSortedListPtr db_xn_wait_for; /* The "wait-for" list, of transactions waiting for other transactions. */
u_int db_xn_call_start; /* Start of the post wait calls. */
@@ -198,6 +203,7 @@ void xt_check_database(XTThreadPtr se
void xt_add_pbxt_file(size_t size, char *path, const char *file);
void xt_add_location_file(size_t size, char *path);
+void xt_add_pbxt_dir(size_t size, char *path);
void xt_add_system_dir(size_t size, char *path);
void xt_add_data_dir(size_t size, char *path);
@@ -244,4 +250,6 @@ inline void xt_xlog_check_long_writer(XT
}
}
+extern XTDatabaseHPtr pbxt_database; // The global open database
+
#endif
=== modified file 'storage/pbxt/src/datadic_xt.cc'
--- a/storage/pbxt/src/datadic_xt.cc 2009-08-18 07:46:53 +0000
+++ b/storage/pbxt/src/datadic_xt.cc 2009-11-24 10:55:06 +0000
@@ -35,7 +35,7 @@
#ifdef DEBUG
#ifdef DRIZZLED
-#include <drizzled/common_includes.h>
+//#include <drizzled/common_includes.h>
#else
#include "mysql_priv.h"
#endif
@@ -437,11 +437,6 @@ class XTTokenizer {
XTToken *nextToken(XTThreadPtr self, c_char *keyword, XTToken *tk);
};
-void ri_free_token(XTThreadPtr XT_UNUSED(self), XTToken *tk)
-{
- delete tk;
-}
-
XTToken *XTTokenizer::newToken(XTThreadPtr self, u_int type, char *start, char *end)
{
if (!tkn_current) {
=== modified file 'storage/pbxt/src/datalog_xt.cc'
--- a/storage/pbxt/src/datalog_xt.cc 2009-09-04 07:29:34 +0000
+++ b/storage/pbxt/src/datalog_xt.cc 2009-11-24 10:55:06 +0000
@@ -410,7 +410,7 @@ static void dl_recover_log(XTThreadPtr s
ASSERT_NS(seq_read.sl_log_eof == seq_read.sl_rec_log_offset);
data_log->dlf_log_eof = seq_read.sl_rec_log_offset;
- if ((size_t) data_log->dlf_log_eof < sizeof(XTXactLogHeaderDRec)) {
+ if (data_log->dlf_log_eof < (off_t) sizeof(XTXactLogHeaderDRec)) {
data_log->dlf_log_eof = sizeof(XTXactLogHeaderDRec);
if (!dl_create_log_header(data_log, seq_read.sl_log_file, self))
xt_throw(self);
@@ -1162,7 +1162,7 @@ xtBool XTDataLogBuffer::dlb_close_log(XT
/* When I use 'thread' instead of 'self', this means
* that I will not throw an error.
*/
-xtBool XTDataLogBuffer::dlb_get_log_offset(xtLogID *log_id, xtLogOffset *out_offset, size_t req_size, struct XTThread *thread)
+xtBool XTDataLogBuffer::dlb_get_log_offset(xtLogID *log_id, xtLogOffset *out_offset, size_t XT_UNUSED(req_size), struct XTThread *thread)
{
/* Note, I am allowing a log to grow beyond the threshold.
* The amount depends on the maximum extended record size.
@@ -1757,7 +1757,7 @@ static xtBool dl_collect_garbage(XTThrea
freer_(); // xt_unlock_mutex(&db->db_co_dlog_lock)
/* Flush the transaction log. */
- if (!xt_xlog_flush_log(self))
+ if (!xt_xlog_flush_log(db, self))
xt_throw(self);
xt_lock_mutex_ns(&db->db_datalogs.dlc_head_lock);
@@ -1891,7 +1891,7 @@ static xtBool dl_collect_garbage(XTThrea
freer_(); // xt_unlock_mutex(&db->db_co_dlog_lock)
/* Flush the transaction log. */
- if (!xt_xlog_flush_log(self))
+ if (!xt_xlog_flush_log(db, self))
xt_throw(self);
/* Save state in source log header. */
=== modified file 'storage/pbxt/src/discover_xt.cc'
--- a/storage/pbxt/src/discover_xt.cc 2009-12-08 21:47:54 +0000
+++ b/storage/pbxt/src/discover_xt.cc 2010-01-04 17:54:42 +0000
@@ -31,6 +31,9 @@
#include <drizzled/session.h>
#include <drizzled/server_includes.h>
#include <drizzled/sql_base.h>
+#include <drizzled/statement/alter_table.h>
+#include <algorithm>
+#include <sstream>
#endif
#include "strutil_xt.h"
@@ -39,18 +42,273 @@
#include "ha_xtsys.h"
#ifndef DRIZZLED
-#if MYSQL_VERSION_ID > 60005
+#if MYSQL_VERSION_ID >= 50404
#define DOT_STR(x) x.str
#else
#define DOT_STR(x) x
#endif
#endif
-#ifndef DRIZZLED
+//#ifndef DRIZZLED
#define LOCK_OPEN_HACK_REQUIRED
-#endif // DRIZZLED
+//#endif // DRIZZLED
#ifdef LOCK_OPEN_HACK_REQUIRED
+#ifdef DRIZZLED
+
+using namespace drizzled;
+using namespace std;
+
+#define mysql_create_table_no_lock hacked_mysql_create_table_no_lock
+
+namespace drizzled {
+
+int rea_create_table(Session *session, const char *path,
+ const char *db, const char *table_name,
+ message::Table *table_proto,
+ HA_CREATE_INFO *create_info,
+ List<CreateField> &create_field,
+ uint32_t key_count,KEY *key_info);
+}
+
+static uint32_t build_tmptable_filename(Session* session,
+ char *buff, size_t bufflen)
+{
+ uint32_t length;
+ ostringstream path_str, post_tmpdir_str;
+ string tmp;
+
+ path_str << drizzle_tmpdir;
+ post_tmpdir_str << "/" << TMP_FILE_PREFIX << current_pid;
+ post_tmpdir_str << session->thread_id << session->tmp_table++;
+ tmp= post_tmpdir_str.str();
+
+ transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower);
+
+ path_str << tmp;
+
+ if (bufflen < path_str.str().length())
+ length= 0;
+ else
+ length= unpack_filename(buff, path_str.str().c_str());
+
+ return length;
+}
+
+static bool mysql_create_table_no_lock(Session *session,
+ const char *db, const char *table_name,
+ HA_CREATE_INFO *create_info,
+ message::Table *table_proto,
+ AlterInfo *alter_info,
+ bool internal_tmp_table,
+ uint32_t select_field_count)
+{
+ char path[FN_REFLEN];
+ uint32_t path_length;
+ uint db_options, key_count;
+ KEY *key_info_buffer;
+ Cursor *file;
+ bool error= true;
+ /* Check for duplicate fields and check type of table to create */
+ if (!alter_info->create_list.elements)
+ {
+ my_message(ER_TABLE_MUST_HAVE_COLUMNS, ER(ER_TABLE_MUST_HAVE_COLUMNS),
+ MYF(0));
+ return true;
+ }
+ assert(strcmp(table_name,table_proto->name().c_str())==0);
+ if (check_engine(session, table_name, create_info))
+ return true;
+ db_options= create_info->table_options;
+ if (create_info->row_type == ROW_TYPE_DYNAMIC)
+ db_options|=HA_OPTION_PACK_RECORD;
+
+ /*if (!(file= create_info->db_type->getCursor((TableShare*) 0, session->mem_root)))
+ {
+ my_error(ER_OUTOFMEMORY, MYF(0), sizeof(Cursor));
+ return true;
+ }*/
+
+ /* PMC - Done to avoid getting the partition handler by mistake! */
+ if (!(file= new (session->mem_root) ha_xtsys(pbxt_hton, NULL)))
+ {
+ my_error(ER_OUTOFMEMORY, MYF(0), sizeof(Cursor));
+ return true;
+ }
+
+ set_table_default_charset(create_info, (char*) db);
+
+ if (mysql_prepare_create_table(session,
+ create_info,
+ table_proto,
+ alter_info,
+ internal_tmp_table,
+ &db_options, file,
+ &key_info_buffer, &key_count,
+ select_field_count))
+ goto err;
+
+ /* Check if table exists */
+ if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
+ {
+ path_length= build_tmptable_filename(session, path, sizeof(path));
+ }
+ else
+ {
+ #ifdef FN_DEVCHAR
+ /* check if the table name contains FN_DEVCHAR when defined */
+ if (strchr(table_name, FN_DEVCHAR))
+ {
+ my_error(ER_WRONG_TABLE_NAME, MYF(0), table_name);
+ return true;
+ }
+#endif
+ path_length= build_table_filename(path, sizeof(path), db, table_name, internal_tmp_table);
+ }
+
+ /* Check if table already exists */
+ if ((create_info->options & HA_LEX_CREATE_TMP_TABLE) &&
+ session->find_temporary_table(db, table_name))
+ {
+ if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
+ {
+ create_info->table_existed= 1; // Mark that table existed
+ push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_NOTE,
+ ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
+ table_name);
+ error= 0;
+ goto err;
+ }
+ my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name);
+ goto err;
+ }
+
+ //pthread_mutex_lock(&LOCK_open); /* CREATE TABLE (some confussion on naming, double check) */
+ if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE))
+ {
+ if (plugin::StorageEngine::getTableDefinition(*session,
+ path,
+ db,
+ table_name,
+ internal_tmp_table) == EEXIST)
+ {
+ if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
+ {
+ error= false;
+ push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_NOTE,
+ ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
+ table_name);
+ create_info->table_existed= 1; // Mark that table existed
+ }
+ else
+ my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
+
+ goto unlock_and_end;
+ }
+ /*
+ * We don't assert here, but check the result, because the table could be
+ * in the table definition cache and in the same time the .frm could be
+ * missing from the disk, in case of manual intervention which deletes
+ * the .frm file. The user has to use FLUSH TABLES; to clear the cache.
+ * Then she could create the table. This case is pretty obscure and
+ * therefore we don't introduce a new error message only for it.
+ * */
+ if (TableShare::getShare(db, table_name))
+ {
+ my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name);
+ goto unlock_and_end;
+ }
+ }
+ /*
+ * Check that table with given name does not already
+ * exist in any storage engine. In such a case it should
+ * be discovered and the error ER_TABLE_EXISTS_ERROR be returned
+ * unless user specified CREATE TABLE IF EXISTS
+ * The LOCK_open mutex has been locked to make sure no
+ * one else is attempting to discover the table. Since
+ * it's not on disk as a frm file, no one could be using it!
+ * */
+ if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE))
+ {
+ bool create_if_not_exists =
+ create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS;
+
+ char table_path[FN_REFLEN];
+ uint32_t table_path_length;
+
+ table_path_length= build_table_filename(table_path, sizeof(table_path),
+ db, table_name, false);
+
+ int retcode= plugin::StorageEngine::getTableDefinition(*session,
+ table_path,
+ db,
+ table_name,
+ false);
+ switch (retcode)
+ {
+ case ENOENT:
+ /* Normal case, no table exists. we can go and create it */
+ break;
+ case EEXIST:
+ if (create_if_not_exists)
+ {
+ error= false;
+ push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_NOTE,
+ ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
+ table_name);
+ create_info->table_existed= 1; // Mark that table existed
+ goto unlock_and_end;
+ }
+ my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
+ goto unlock_and_end;
+ default:
+ my_error(retcode, MYF(0),table_name);
+ goto unlock_and_end;
+ }
+ }
+
+ session->set_proc_info("creating table");
+ create_info->table_existed= 0; // Mark that table is created
+
+ create_info->table_options=db_options;
+
+ if (rea_create_table(session, path, db, table_name,
+ table_proto,
+ create_info, alter_info->create_list,
+ key_count, key_info_buffer))
+ goto unlock_and_end;
+
+ if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
+ {
+ /* Open table and put in temporary table list */
+ if (!(session->open_temporary_table(path, db, table_name, 1, OTM_OPEN)))
+ {
+ (void) session->rm_temporary_table(create_info->db_type, path);
+ goto unlock_and_end;
+ }
+ }
+
+ /*
+ * Don't write statement if:
+ * - It is an internal temporary table,
+ * - Row-based logging is used and it we are creating a temporary table, or
+ * - The binary log is not open.
+ * Otherwise, the statement shall be binlogged.
+ * */
+ if (!internal_tmp_table &&
+ ((!(create_info->options & HA_LEX_CREATE_TMP_TABLE))))
+ write_bin_log(session, session->query, session->query_length);
+ error= false;
+unlock_and_end:
+ //pthread_mutex_unlock(&LOCK_open);
+
+err:
+ session->set_proc_info("After create");
+ delete file;
+ return(error);
+}
+
+#else // MySQL case
///////////////////////////////
/*
* Unfortunately I cannot use the standard mysql_create_table_no_lock() because it will lock "LOCK_open"
@@ -1229,13 +1487,13 @@ static bool mysql_create_table_no_lock(T
if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
{
/* Open table and put in temporary table list */
-#if MYSQL_VERSION_ID > 60005
+#if MYSQL_VERSION_ID >= 50404
if (!(open_temporary_table(thd, path, db, table_name, 1, OTM_OPEN)))
#else
if (!(open_temporary_table(thd, path, db, table_name, 1)))
#endif
{
-#if MYSQL_VERSION_ID > 60005
+#if MYSQL_VERSION_ID >= 50404
(void) rm_temporary_table(create_info->db_type, path, false);
#else
(void) rm_temporary_table(create_info->db_type, path);
@@ -1252,11 +1510,21 @@ static bool mysql_create_table_no_lock(T
- The binary log is not open.
Otherwise, the statement shall be binlogged.
*/
+ /* PBXT 1.0.09e
+ * Firstly we had a compile problem with MySQL 5.1.42 and
+ * the write_bin_log() call below:
+ * discover_xt.cc:1259: error: argument of type 'char* (Statement::)()' does not match 'const char*'
+ *
+ * And secondly, we should no write the BINLOG anyway because this is
+ * an internal PBXT system table.
+ *
+ * So I am just commenting out the code altogether.
if (!internal_tmp_table &&
(!thd->current_stmt_binlog_row_based ||
(thd->current_stmt_binlog_row_based &&
!(create_info->options & HA_LEX_CREATE_TMP_TABLE))))
- write_bin_log(thd, TRUE, thd->query(), thd->query_length());
+ write_bin_log(thd, TRUE, thd->query, thd->query_length);
+ */
error= FALSE;
unlock_and_end:
pthread_mutex_unlock(&LOCK_open);
@@ -1279,37 +1547,51 @@ warn:
////// END OF CUT AND PASTES FROM sql_table.cc ////////
////////////////////////////////////////////////////////
+#endif // DRIZZLED
#endif // LOCK_OPEN_HACK_REQUIRED
//------------------------------
int xt_create_table_frm(handlerton *hton, THD* thd, const char *db, const char *name, DT_FIELD_INFO *info, DT_KEY_INFO *XT_UNUSED(keys), xtBool skip_existing)
{
#ifdef DRIZZLED
- drizzled::message::Table table_proto;
+#define MYLEX_CREATE_INFO create_info
+#else
+#define MYLEX_CREATE_INFO mylex.create_info
+#endif
+
+#ifdef DRIZZLED
+ drizzled::statement::AlterTable *stmt = new drizzled::statement::AlterTable(thd);
+ HA_CREATE_INFO create_info;
+ //AlterInfo alter_info;
+ drizzled::message::Table table_proto;
static const char *ext = ".dfe";
static const int ext_len = 4;
+
+ table_proto.mutable_engine()->mutable_name()->assign("PBXT");
#else
static const char *ext = ".frm";
static const int ext_len = 4;
#endif
int err = 1;
- //HA_CREATE_INFO create_info = {0};
- //Alter_info alter_info;
char field_length_buffer[12], *field_length_ptr;
LEX *save_lex= thd->lex, mylex;
-
- memset(&mylex.create_info, 0, sizeof(HA_CREATE_INFO));
+
+ memset(&MYLEX_CREATE_INFO, 0, sizeof(HA_CREATE_INFO));
thd->lex = &mylex;
- lex_start(thd);
+ lex_start(thd);
+#ifdef DRIZZLED
+ mylex.statement = stmt;
+#endif
/* setup the create info */
- mylex.create_info.db_type = hton;
+ MYLEX_CREATE_INFO.db_type = hton;
+
#ifndef DRIZZLED
mylex.create_info.frm_only = 1;
#endif
- mylex.create_info.default_table_charset = system_charset_info;
+ MYLEX_CREATE_INFO.default_table_charset = system_charset_info;
/* setup the column info. */
while (info->field_name) {
@@ -1335,7 +1617,7 @@ int xt_create_table_frm(handlerton *hton
#else
if (add_field_to_list(thd, &field_name, info->field_type, field_length_ptr, info->field_decimal_length,
info->field_flags,
-#if MYSQL_VERSION_ID > 60005
+#if MYSQL_VERSION_ID >= 50404
HA_SM_DISK,
COLUMN_FORMAT_TYPE_FIXED,
#endif
@@ -1370,7 +1652,7 @@ int xt_create_table_frm(handlerton *hton
table_proto.set_name(name);
table_proto.set_type(drizzled::message::Table::STANDARD);
- if (mysql_create_table_no_lock(thd, db, name, &mylex.create_info, &table_proto, &mylex.alter_info, 1, 0, false))
+ if (mysql_create_table_no_lock(thd, db, name, &create_info, &table_proto, &stmt->alter_info, 1, 0))
goto error;
#else
if (mysql_create_table_no_lock(thd, db, name, &mylex.create_info, &mylex.alter_info, 1, 0))
=== modified file 'storage/pbxt/src/filesys_xt.cc'
--- a/storage/pbxt/src/filesys_xt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/filesys_xt.cc 2009-11-24 10:55:06 +0000
@@ -56,6 +56,8 @@
//#define DEBUG_TRACE_FILES
//#define INJECT_WRITE_REMAP_ERROR
/* This is required to make testing on the Mac faster: */
+/* It turns of full file sync. */
+#define DEBUG_FAST_MAC
#endif
#ifdef DEBUG_TRACE_FILES
@@ -63,10 +65,6 @@
#define PRINTF xt_trace
#endif
-#if defined(XT_MAC) && defined(F_FULLFSYNC)
-#undef F_FULLFSYNC
-#endif
-
#ifdef INJECT_WRITE_REMAP_ERROR
#define INJECT_REMAP_FILE_SIZE 1000000
#define INJECT_REMAP_FILE_TYPE "xtd"
@@ -883,7 +881,7 @@ xtPublic xtBool xt_flush_file(XTOpenFile
* fsync didn't really flush index pages to disk. fcntl(F_FULLFSYNC) is considered more effective
* in such case.
*/
-#ifdef F_FULLFSYNC
+#if defined(F_FULLFSYNC) && !defined(DEBUG_FAST_MAC)
if (fcntl(of->of_filedes, F_FULLFSYNC, 0) == -1) {
xt_register_ferrno(XT_REG_CONTEXT, errno, xt_file_path(of));
goto failed;
=== modified file 'storage/pbxt/src/filesys_xt.h'
--- a/storage/pbxt/src/filesys_xt.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/filesys_xt.h 2009-11-24 10:55:06 +0000
@@ -102,7 +102,7 @@ xtBool xt_fs_rename(struct XTThread *s
#define FILE_MAP_UNLOCK(i, o) xt_xsmutex_unlock(i, o)
#elif defined(FILE_MAP_USE_PTHREAD_RW)
#define FILE_MAP_LOCK_TYPE xt_rwlock_type
-#define FILE_MAP_INIT_LOCK(s, i) xt_init_rwlock(s, i)
+#define FILE_MAP_INIT_LOCK(s, i) xt_init_rwlock_with_autoname(s, i)
#define FILE_MAP_FREE_LOCK(s, i) xt_free_rwlock(i)
#define FILE_MAP_READ_LOCK(i, o) xt_slock_rwlock_ns(i)
#define FILE_MAP_WRITE_LOCK(i, o) xt_xlock_rwlock_ns(i)
=== modified file 'storage/pbxt/src/ha_pbxt.cc'
--- a/storage/pbxt/src/ha_pbxt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/ha_pbxt.cc 2009-11-27 15:37:02 +0000
@@ -35,6 +35,7 @@
#include <stdlib.h>
#include <time.h>
+#include <ctype.h>
#ifdef DRIZZLED
#include <drizzled/common.h>
@@ -42,14 +43,21 @@
#include <mysys/my_alloc.h>
#include <mysys/hash.h>
#include <drizzled/field.h>
-#include <drizzled/current_session.h>
+#include <drizzled/session.h>
#include <drizzled/data_home.h>
#include <drizzled/error.h>
#include <drizzled/table.h>
#include <drizzled/field/timestamp.h>
#include <drizzled/server_includes.h>
+#include <drizzled/plugin/info_schema_table.h>
extern "C" char **session_query(Session *session);
#define my_strdup(a,b) strdup(a)
+
+using drizzled::plugin::Registry;
+using drizzled::plugin::ColumnInfo;
+using drizzled::plugin::InfoSchemaTable;
+using drizzled::plugin::InfoSchemaMethods;
+
#else
#include "mysql_priv.h"
#include <mysql/plugin.h>
@@ -71,7 +79,7 @@ extern "C" char **session_query(Session
#include "tabcache_xt.h"
#include "systab_xt.h"
#include "xaction_xt.h"
-#include "restart_xt.h"
+#include "backup_xt.h"
#ifdef DEBUG
//#define XT_USE_SYS_PAR_DEBUG_SIZES
@@ -101,6 +109,10 @@ static void pbxt_drop_database(handlert
static int pbxt_close_connection(handlerton *hton, THD* thd);
static int pbxt_commit(handlerton *hton, THD *thd, bool all);
static int pbxt_rollback(handlerton *hton, THD *thd, bool all);
+static int pbxt_prepare(handlerton *hton, THD *thd, bool all);
+static int pbxt_recover(handlerton *hton, XID *xid_list, uint len);
+static int pbxt_commit_by_xid(handlerton *hton, XID *xid);
+static int pbxt_rollback_by_xid(handlerton *hton, XID *xid);
#endif
static void ha_aquire_exclusive_use(XTThreadPtr self, XTSharePtr share, ha_pbxt *mine);
static void ha_release_exclusive_use(XTThreadPtr self, XTSharePtr share);
@@ -123,7 +135,9 @@ static void ha_close_open_tables(XTThre
#ifdef PBXT_HANDLER_TRACE
#define PBXT_ALLOW_PRINTING
-#define XT_TRACE_CALL() do { XTThreadPtr s = xt_get_self(); printf("%s %s\n", s ? s->t_name : "-unknown-", __FUNC__); } while (0)
+#define XT_TRACE_CALL() ha_trace_function(__FUNC__, NULL)
+#define XT_TRACE_METHOD() ha_trace_function(__FUNC__, pb_share->sh_table_path->ps_path)
+
#ifdef PBXT_TRACE_RETURN
#define XT_RETURN(x) do { printf("%d\n", (int) (x)); return (x); } while (0)
#define XT_RETURN_VOID do { printf("out\n"); return; } while (0)
@@ -135,6 +149,7 @@ static void ha_close_open_tables(XTThre
#else
#define XT_TRACE_CALL()
+#define XT_TRACE_METHOD()
#define XT_RETURN(x) return (x)
#define XT_RETURN_VOID return
@@ -165,10 +180,10 @@ xtBool pbxt_crash_debug = TRUE;
xtBool pbxt_crash_debug = FALSE;
#endif
+
/* Variables for pbxt share methods */
static xt_mutex_type pbxt_database_mutex; // Prevent a database from being opened while it is being dropped
static XTHashTabPtr pbxt_share_tables; // Hash used to track open tables
-XTDatabaseHPtr pbxt_database = NULL; // The global open database
static char *pbxt_index_cache_size;
static char *pbxt_record_cache_size;
static char *pbxt_log_cache_size;
@@ -180,6 +195,12 @@ static char *pbxt_data_log_threshold;
static char *pbxt_data_file_grow_size;
static char *pbxt_row_file_grow_size;
static int pbxt_max_threads;
+static my_bool pbxt_support_xa;
+
+#ifndef DRIZZLED
+// drizzle complains it's not used
+static XTXactEnumXARec pbxt_xa_enum;
+#endif
#ifdef DEBUG
#define XT_SHARE_LOCK_WAIT 5000
@@ -259,6 +280,33 @@ static HAVarParamsRec vp_row_file_grow_s
//#define XT_AUTO_INCREMENT_DEF 1
#endif
+#ifdef PBXT_HANDLER_TRACE
+static void ha_trace_function(const char *function, char *table)
+{
+ char func_buf[50], *ptr;
+ XTThreadPtr thread = xt_get_self();
+
+ if ((ptr = strchr(function, '('))) {
+ ptr--;
+ while (ptr > function) {
+ if (!(isalnum(*ptr) || *ptr == '_'))
+ break;
+ ptr--;
+ }
+ ptr++;
+ xt_strcpy(50, func_buf, ptr);
+ if ((ptr = strchr(func_buf, '(')))
+ *ptr = 0;
+ }
+ else
+ xt_strcpy(50, func_buf, function);
+ if (table)
+ printf("%s %s (%s)\n", thread ? thread->t_name : "-unknown-", func_buf, table);
+ else
+ printf("%s %s\n", thread ? thread->t_name : "-unknown-", func_buf);
+}
+#endif
+
/*
* -----------------------------------------------------------------------
* SHARED TABLE DATA
@@ -584,6 +632,9 @@ xtPublic XTThreadPtr xt_ha_thd_to_self(T
/* The first bit is 1. */
static u_int ha_get_max_bit(MX_BITMAP *map)
{
+#ifdef DRIZZLED
+ return map->getFirstSet();
+#else
my_bitmap_map *data_ptr = map->bitmap;
my_bitmap_map *end_ptr = map->last_word_ptr;
my_bitmap_map b;
@@ -612,6 +663,7 @@ static u_int ha_get_max_bit(MX_BITMAP *m
cnt -= 32;
}
return 0;
+#endif
}
/*
@@ -684,9 +736,10 @@ xtPublic int xt_ha_pbxt_to_mysql_error(i
return(-1); // Unknown error
}
-xtPublic int xt_ha_pbxt_thread_error_for_mysql(THD *XT_UNUSED(thd), const XTThreadPtr self, int ignore_dup_key)
+xtPublic int xt_ha_pbxt_thread_error_for_mysql(THD *thd, const XTThreadPtr self, int ignore_dup_key)
{
- int xt_err = self->t_exception.e_xt_err;
+ int xt_err = self->t_exception.e_xt_err;
+ xtBool dup_key = FALSE;
XT_PRINT2(self, "xt_ha_pbxt_thread_error_for_mysql xt_err=%d auto commit=%d\n", (int) xt_err, (int) self->st_auto_commit);
switch (xt_err) {
@@ -725,6 +778,7 @@ xtPublic int xt_ha_pbxt_thread_error_for
/* If we are in auto-commit mode (and we are not ignoring
* duplicate keys) then rollback the transaction automatically.
*/
+ dup_key = TRUE;
if (!ignore_dup_key && self->st_auto_commit)
goto abort_transaction;
break;
@@ -790,26 +844,20 @@ xtPublic int xt_ha_pbxt_thread_error_for
/* Locks are held on tables.
* Only rollback after locks are released.
*/
- self->st_auto_commit = TRUE;
+ /* I do not think this is required, because
+ * I tell mysql to rollback below,
+ * besides it is a hack!
+ self->st_auto_commit = TRUE;
+ */
self->st_abort_trans = TRUE;
}
-#ifdef xxxx
-/* DBUG_ASSERT(thd->transaction.stmt.ha_list == NULL ||
- trans == &thd->transaction.stmt); in handler.cc now
- * fails, and I don't know if this function can be called anymore! */
- /* Cause any other DBs to do a rollback as well... */
- if (thd) {
- /*
- * GOTCHA:
- * This is a BUG in MySQL. I cannot rollback a transaction if
- * pb_mysql_thd->in_sub_stmt! But I must....?!
- */
-#ifdef MYSQL_SERVER
- if (!thd->in_sub_stmt)
- ha_rollback(thd);
-#endif
+ /* Only tell MySQL to rollback if we automatically rollback.
+ * Note: calling this with (thd, FALSE), cause sp.test to fail.
+ */
+ if (!dup_key) {
+ if (thd)
+ thd_mark_transaction_to_rollback(thd, TRUE);
}
-#endif
}
break;
}
@@ -908,7 +956,11 @@ static void pbxt_call_init(XTThreadPtr s
xt_db_data_file_grow_size = (size_t) data_file_grow_size;
xt_db_row_file_grow_size = (size_t) row_file_grow_size;
+#ifdef DRIZZLED
+ pbxt_ignore_case = TRUE;
+#else
pbxt_ignore_case = lower_case_table_names != 0;
+#endif
if (pbxt_ignore_case)
pbxt_share_tables = xt_new_hashtable(self, ha_hash_comp_ci, ha_hash_ci, ha_hash_free, TRUE, FALSE);
else
@@ -968,7 +1020,7 @@ static void pbxt_call_exit(XTThreadPtr s
*/
static void ha_exit(XTThreadPtr self)
{
- xt_xres_wait_for_recovery(self);
+ xt_xres_terminate_recovery(self);
/* Wrap things up... */
xt_unuse_database(self, self); /* Just in case the main thread has a database in use (for testing)? */
@@ -1024,7 +1076,7 @@ static bool pbxt_show_status(handlerton
cont_(a);
if (!not_ok) {
- if (stat_print(thd, "PBXT", 4, "", 0, strbuf.sb_cstring, strbuf.sb_len))
+ if (stat_print(thd, "PBXT", 4, "", 0, strbuf.sb_cstring, (uint) strbuf.sb_len))
not_ok = TRUE;
}
xt_sb_set_size(self, &strbuf, 0);
@@ -1038,14 +1090,14 @@ static bool pbxt_show_status(handlerton
* return 1 on error, else 0.
*/
#ifdef DRIZZLED
-static int pbxt_init(PluginRegistry ®istry)
+static int pbxt_init(Registry ®istry)
#else
static int pbxt_init(void *p)
#endif
{
int init_err = 0;
- XT_TRACE_CALL();
+ XT_PRINT0(NULL, "pbxt_init\n");
if (sizeof(xtWordPS) != sizeof(void *)) {
printf("PBXT: This won't work, I require that sizeof(xtWordPS) == sizeof(void *)!\n");
@@ -1076,11 +1128,27 @@ static int pbxt_init(void *p)
pbxt_hton->close_connection = pbxt_close_connection; /* close_connection, cleanup thread related data. */
pbxt_hton->commit = pbxt_commit; /* commit */
pbxt_hton->rollback = pbxt_rollback; /* rollback */
+ if (pbxt_support_xa) {
+ pbxt_hton->prepare = pbxt_prepare;
+ pbxt_hton->recover = pbxt_recover;
+ pbxt_hton->commit_by_xid = pbxt_commit_by_xid;
+ pbxt_hton->rollback_by_xid = pbxt_rollback_by_xid;
+ }
+ else {
+ pbxt_hton->prepare = NULL;
+ pbxt_hton->recover = NULL;
+ pbxt_hton->commit_by_xid = NULL;
+ pbxt_hton->rollback_by_xid = NULL;
+ }
pbxt_hton->create = pbxt_create_handler; /* Create a new handler */
pbxt_hton->drop_database = pbxt_drop_database; /* Drop a database */
pbxt_hton->panic = pbxt_panic; /* Panic call */
pbxt_hton->show_status = pbxt_show_status;
pbxt_hton->flags = HTON_NO_FLAGS; /* HTON_CAN_RECREATE - Without this flags TRUNCATE uses delete_all_rows() */
+ pbxt_hton->slot = (uint)-1; /* assign invald value, so we know when it's inited later */
+#if defined(MYSQL_SUPPORTS_BACKUP) && defined(XT_ENABLE_ONLINE_BACKUP)
+ pbxt_hton->get_backup_engine = pbxt_backup_engine;
+#endif
#endif
if (!xt_init_logging()) /* Initialize logging */
goto error_1;
@@ -1160,8 +1228,10 @@ static int pbxt_init(void *p)
* Only real problem, 2 threads try to load the same
* plugin at the same time.
*/
+#if MYSQL_VERSION_ID < 60014
myxt_mutex_unlock(&LOCK_plugin);
#endif
+#endif
/* Can't do this here yet, because I need a THD! */
try_(b) {
@@ -1195,8 +1265,10 @@ static int pbxt_init(void *p)
if (thd)
myxt_destroy_thread(thd, FALSE);
#ifndef DRIZZLED
+#if MYSQL_VERSION_ID < 60014
myxt_mutex_lock(&LOCK_plugin);
#endif
+#endif
}
#endif
}
@@ -1262,7 +1334,7 @@ static int pbxt_init(void *p)
}
#ifdef DRIZZLED
-static int pbxt_end(PluginRegistry ®istry)
+static int pbxt_end(Registry ®istry)
#else
static int pbxt_end(void *)
#endif
@@ -1378,7 +1450,7 @@ static int pbxt_commit(handlerton *hton,
* transaction (!all && !self->st_auto_commit).
*/
if (all || self->st_auto_commit) {
- XT_PRINT0(self, "xt_xn_commit\n");
+ XT_PRINT0(self, "xt_xn_commit in pbxt_commit\n");
if (!xt_xn_commit(self))
err = xt_ha_pbxt_thread_error_for_mysql(thd, self, FALSE);
@@ -1402,7 +1474,7 @@ static int pbxt_rollback(handlerton *hto
XTThreadPtr self;
if ((self = (XTThreadPtr) *thd_ha_data(thd, hton))) {
- XT_PRINT1(self, "pbxt_rollback all=%d\n", all);
+ XT_PRINT1(self, "pbxt_rollback all=%d in pbxt_commit\n", all);
if (self->st_xact_data) {
/* There are no table locks, rollback immediately in all cases
@@ -1431,7 +1503,7 @@ static int pbxt_rollback(handlerton *hto
}
#ifdef DRIZZLED
-handler *PBXTStorageEngine::create(TABLE_SHARE *table, MEM_ROOT *mem_root)
+Cursor *PBXTStorageEngine::create(TABLE_SHARE *table, MEM_ROOT *mem_root)
{
PBXTStorageEngine * const hton = this;
#else
@@ -1446,6 +1518,182 @@ static handler *pbxt_create_handler(hand
/*
* -----------------------------------------------------------------------
+ * 2-PHASE COMMIT
+ *
+ */
+
+#ifndef DRIZZLED
+
+static int pbxt_prepare(handlerton *hton, THD *thd, bool all)
+{
+ int err = 0;
+ XTThreadPtr self;
+
+ XT_TRACE_CALL();
+ if ((self = (XTThreadPtr) *thd_ha_data(thd, hton))) {
+ XT_PRINT1(self, "pbxt_commit all=%d\n", all);
+
+ if (self->st_xact_data) {
+ /* There are no table locks, commit immediately in all cases
+ * except when this is a statement commit with an explicit
+ * transaction (!all && !self->st_auto_commit).
+ */
+ if (all) {
+ XID xid;
+
+ XT_PRINT0(self, "xt_xn_prepare in pbxt_prepare\n");
+ thd_get_xid(thd, (MYSQL_XID*) &xid);
+
+ if (!xt_xn_prepare(xid.length(), (xtWord1 *) &xid, self))
+ err = xt_ha_pbxt_thread_error_for_mysql(thd, self, FALSE);
+ }
+ }
+ }
+ return err;
+}
+
+static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, char *thread_name, int *err)
+{
+ THD *thd;
+ XTThreadPtr self = NULL;
+
+ *temp_thread = 0;
+ if ((thd = current_thd))
+ self = (XTThreadPtr) *thd_ha_data(thd, hton);
+ else {
+ //thd = (THD *) myxt_create_thread();
+ //*temp_thread |= 2;
+ }
+
+ if (!self) {
+ XTExceptionRec e;
+
+ if (!(self = xt_create_thread(thread_name, FALSE, TRUE, &e))) {
+ *err = xt_ha_pbxt_to_mysql_error(e.e_xt_err);
+ xt_log_exception(NULL, &e, XT_LOG_DEFAULT);
+ return NULL;
+ }
+ *temp_thread |= 1;
+ }
+
+ xt_xres_wait_for_recovery(self, XT_RECOVER_DONE);
+
+ try_(a) {
+ xt_open_database(self, mysql_real_data_home, TRUE);
+ }
+ catch_(a) {
+ *err = xt_ha_pbxt_thread_error_for_mysql(thd, self, FALSE);
+ if ((*temp_thread & 1))
+ xt_free_thread(self);
+ if (*temp_thread & 2)
+ myxt_destroy_thread(thd, FALSE);
+ self = NULL;
+ }
+ cont_(a);
+
+ *ret_thd = thd;
+ return self;
+}
+
+static void ha_temp_close_database(XTThreadPtr self, THD *thd, int temp_thread)
+{
+ xt_unuse_database(self, self);
+ if (temp_thread & 1)
+ xt_free_thread(self);
+ if (temp_thread & 2)
+ myxt_destroy_thread(thd, TRUE);
+}
+
+/* Return all prepared transactions, found during recovery.
+ * This function returns a count. If len is returned, the
+ * function will be called again.
+ */
+static int pbxt_recover(handlerton *hton, XID *xid_list, uint len)
+{
+ xtBool temp_thread;
+ XTThreadPtr self;
+ XTDatabaseHPtr db;
+ uint count = 0;
+ XTXactPreparePtr xap;
+ int err;
+ THD *thd;
+
+ if (!(self = ha_temp_open_global_database(hton, &thd, &temp_thread, "TempForRecover", &err)))
+ return 0;
+
+ db = self->st_database;
+
+ for (count=0; count<len; count++) {
+ xap = xt_xn_enum_xa_data(db, &pbxt_xa_enum);
+ if (!xap)
+ break;
+ memcpy(&xid_list[count], xap->xp_xa_data, xap->xp_data_len);
+ }
+
+ ha_temp_close_database(self, thd, temp_thread);
+ return (int) count;
+}
+
+static int pbxt_commit_by_xid(handlerton *hton, XID *xid)
+{
+ xtBool temp_thread;
+ XTThreadPtr self;
+ XTDatabaseHPtr db;
+ int err = 0;
+ XTXactPreparePtr xap;
+ THD *thd;
+
+ XT_TRACE_CALL();
+
+ if (!(self = ha_temp_open_global_database(hton, &thd, &temp_thread, "TempForCommitXA", &err)))
+ return err;
+ db = self->st_database;
+
+ if ((xap = xt_xn_find_xa_data(db, xid->length(), (xtWord1 *) xid, TRUE, self))) {
+ if ((self->st_xact_data = xt_xn_get_xact(db, xap->xp_xact_id, self))) {
+ self->st_xact_data->xd_flags &= ~XT_XN_XAC_PREPARED; // Prepared transactions cannot be swept!
+ if (!xt_xn_commit(self))
+ err = xt_ha_pbxt_thread_error_for_mysql(thd, self, FALSE);
+ }
+ xt_xn_delete_xa_data(db, xap, TRUE, self);
+ }
+
+ ha_temp_close_database(self, thd, temp_thread);
+ return 0;
+}
+
+static int pbxt_rollback_by_xid(handlerton *hton, XID *xid)
+{
+ int temp_thread;
+ XTThreadPtr self;
+ XTDatabaseHPtr db;
+ int err = 0;
+ XTXactPreparePtr xap;
+ THD *thd;
+
+ XT_TRACE_CALL();
+
+ if (!(self = ha_temp_open_global_database(hton, &thd, &temp_thread, "TempForRollbackXA", &err)))
+ return err;
+ db = self->st_database;
+
+ if ((xap = xt_xn_find_xa_data(db, xid->length(), (xtWord1 *) xid, TRUE, self))) {
+ if ((self->st_xact_data = xt_xn_get_xact(db, xap->xp_xact_id, self))) {
+ self->st_xact_data->xd_flags &= ~XT_XN_XAC_PREPARED; // Prepared transactions cannot be swept!
+ if (!xt_xn_rollback(self))
+ err = xt_ha_pbxt_thread_error_for_mysql(thd, self, FALSE);
+ }
+ xt_xn_delete_xa_data(db, xap, TRUE, self);
+ }
+
+ ha_temp_close_database(self, thd, temp_thread);
+ return 0;
+}
+
+#endif
+
+/*
+ * -----------------------------------------------------------------------
* HANDLER LOCKING FUNCTIONS
*
* These functions are used get a lock on all handles of a particular table.
@@ -1497,7 +1745,7 @@ static void ha_aquire_exclusive_use(XTTh
ha_pbxt *handler;
time_t end_time = time(NULL) + XT_SHARE_LOCK_TIMEOUT / 1000;
- XT_PRINT1(self, "ha_aquire_exclusive_use %s PBXT X lock\n", share->sh_table_path->ps_path);
+ XT_PRINT1(self, "ha_aquire_exclusive_use (%s) PBXT X lock\n", share->sh_table_path->ps_path);
/* GOTCHA: It is possible to hang here, if you hold
* onto the sh_ex_mutex lock, before we really
* have the exclusive lock (i.e. before all
@@ -1578,7 +1826,7 @@ static void ha_release_exclusive_use(XTT
static void ha_release_exclusive_use(XTThreadPtr XT_UNUSED(self), XTSharePtr share)
#endif
{
- XT_PRINT1(self, "ha_release_exclusive_use %s PBXT X UNLOCK\n", share->sh_table_path->ps_path);
+ XT_PRINT1(self, "ha_release_exclusive_use (%s) PBXT X UNLOCK\n", share->sh_table_path->ps_path);
xt_lock_mutex_ns((xt_mutex_type *) share->sh_ex_mutex);
share->sh_table_lock = FALSE;
xt_broadcast_cond_ns((xt_cond_type *) share->sh_ex_cond);
@@ -1589,7 +1837,7 @@ static xtBool ha_wait_for_shared_use(ha_
{
time_t end_time = time(NULL) + XT_SHARE_LOCK_TIMEOUT / 1000;
- XT_PRINT1(xt_get_self(), "ha_wait_for_shared_use %s share lock wait...\n", share->sh_table_path->ps_path);
+ XT_PRINT1(xt_get_self(), "ha_wait_for_shared_use (%s) share lock wait...\n", share->sh_table_path->ps_path);
mine->pb_ex_in_use = 0;
xt_lock_mutex_ns((xt_mutex_type *) share->sh_ex_mutex);
while (share->sh_table_lock) {
@@ -1667,14 +1915,38 @@ xtPublic int ha_pbxt::reopen()
*
*/
-int pbxt_statistics_fill_table(THD *thd, TABLE_LIST *tables, COND *cond)
+static int pbxt_statistics_fill_table(THD *thd, TABLE_LIST *tables, COND *cond)
{
- XTThreadPtr self;
+ XTThreadPtr self = NULL;
int err = 0;
+ if (!pbxt_hton) {
+ /* Can't do if PBXT is not loaded! */
+ XTExceptionRec e;
+
+ xt_exception_xterr(&e, XT_CONTEXT, XT_ERR_PBXT_NOT_INSTALLED);
+ xt_log_exception(NULL, &e, XT_LOG_DEFAULT);
+ /* Just return an empty set: */
+ return 0;
+ }
+
if (!(self = ha_set_current_thread(thd, &err)))
return xt_ha_pbxt_to_mysql_error(err);
+
+
try_(a) {
+ /* If the thread has no open database, and the global
+ * database is already open, then open
+ * the database. Otherwise the statement will be
+ * executed without an open database, which means
+ * that the related statistics will be missing.
+ *
+ * This includes all background threads.
+ */
+ if (!self->st_database && pbxt_database) {
+ xt_ha_open_database_of_table(self, (XTPathStrPtr) NULL);
+ }
+
err = myxt_statistics_fill_table(self, thd, tables, cond, system_charset_info);
}
catch_(a) {
@@ -1684,6 +1956,24 @@ int pbxt_statistics_fill_table(THD *thd,
return err;
}
+#ifdef DRIZZLED
+ColumnInfo pbxt_statistics_fields_info[]=
+{
+ ColumnInfo("ID", 4, MYSQL_TYPE_LONG, 0, 0, "The ID of the statistic", SKIP_OPEN_TABLE),
+ ColumnInfo("Name", 40, MYSQL_TYPE_STRING, 0, 0, "The name of the statistic", SKIP_OPEN_TABLE),
+ ColumnInfo("Value", 8, MYSQL_TYPE_LONGLONG, 0, 0, "The accumulated value", SKIP_OPEN_TABLE),
+ ColumnInfo()
+};
+
+class PBXTStatisticsMethods : public InfoSchemaMethods
+{
+public:
+ int fillTable(Session *session, TableList *tables, COND *cond)
+ {
+ return pbxt_statistics_fill_table(session, tables, cond);
+ }
+};
+#else
ST_FIELD_INFO pbxt_statistics_fields_info[]=
{
{ "ID", 4, MYSQL_TYPE_LONG, 0, 0, "The ID of the statistic", SKIP_OPEN_TABLE},
@@ -1691,24 +1981,28 @@ ST_FIELD_INFO pbxt_statistics_fields_inf
{ "Value", 8, MYSQL_TYPE_LONGLONG, 0, 0, "The accumulated value", SKIP_OPEN_TABLE},
{ 0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
};
+#endif
#ifdef DRIZZLED
static InfoSchemaTable *pbxt_statistics_table;
-
-int pbxt_init_statitics(PluginRegistry ®istry)
+static PBXTStatisticsMethods pbxt_statistics_methods;
+static int pbxt_init_statistics(Registry ®istry)
#else
-int pbxt_init_statitics(void *p)
+static int pbxt_init_statistics(void *p)
#endif
{
#ifdef DRIZZLED
- pbxt_statistics_table = (InfoSchemaTable *)xt_calloc_ns(sizeof(InfoSchemaTable));
- pbxt_statistics_table->table_name= "PBXT_STATISTICS";
+ //pbxt_statistics_table = (InfoSchemaTable *)xt_calloc_ns(sizeof(InfoSchemaTable));
+ //pbxt_statistics_table->table_name= "PBXT_STATISTICS";
+ pbxt_statistics_table = new InfoSchemaTable("PBXT_STATISTICS");
+ pbxt_statistics_table->setColumnInfo(pbxt_statistics_fields_info);
+ pbxt_statistics_table->setInfoSchemaMethods(&pbxt_statistics_methods);
registry.add(pbxt_statistics_table);
#else
ST_SCHEMA_TABLE *pbxt_statistics_table = (ST_SCHEMA_TABLE *) p;
-#endif
pbxt_statistics_table->fields_info = pbxt_statistics_fields_info;
pbxt_statistics_table->fill_table = pbxt_statistics_fill_table;
+#endif
#if defined(XT_WIN) && defined(XT_COREDUMP)
void register_crash_filter();
@@ -1721,14 +2015,14 @@ int pbxt_init_statitics(void *p)
}
#ifdef DRIZZLED
-int pbxt_exit_statitics(PluginRegistry ®istry)
+static int pbxt_exit_statistics(Registry ®istry)
#else
-int pbxt_exit_statitics(void *XT_UNUSED(p))
+static int pbxt_exit_statistics(void *XT_UNUSED(p))
#endif
{
#ifdef DRIZZLED
registry.remove(pbxt_statistics_table);
- xt_free_ns(pbxt_statistics_table);
+ delete pbxt_statistics_table;
#endif
return(0);
}
@@ -1758,7 +2052,11 @@ ha_pbxt::ha_pbxt(handlerton *hton, TABLE
* exist for the storage engine. This is also used by the default rename_table and
* delete_table method in handler.cc.
*/
+#ifdef DRIZZLED
+const char **PBXTStorageEngine::bas_ext() const
+#else
const char **ha_pbxt::bas_ext() const
+#endif
{
return pbxt_extensions;
}
@@ -1800,11 +2098,13 @@ MX_TABLE_TYPES_T ha_pbxt::table_flags()
* purposes!
HA_NOT_EXACT_COUNT |
*/
+#ifndef DRIZZLED
/*
* This basically means we have a file with the name of
* database table (which we do).
*/
HA_FILE_BASED |
+#endif
/*
* Not sure what this does (but MyISAM and InnoDB have it)?!
* Could it mean that we support the handler functions.
@@ -1971,7 +2271,7 @@ int ha_pbxt::open(const char *table_path
if (!(self = ha_set_current_thread(thd, &err)))
return xt_ha_pbxt_to_mysql_error(err);
- XT_PRINT1(self, "ha_pbxt::open %s\n", table_path);
+ XT_PRINT1(self, "open (%s)\n", table_path);
pb_ex_in_use = 1;
try_(a) {
@@ -2049,7 +2349,7 @@ int ha_pbxt::close(void)
}
}
- XT_PRINT1(self, "ha_pbxt::close %s\n", pb_share && pb_share->sh_table_path->ps_path ? pb_share->sh_table_path->ps_path : "unknown");
+ XT_PRINT1(self, "close (%s)\n", pb_share && pb_share->sh_table_path->ps_path ? pb_share->sh_table_path->ps_path : "unknown");
if (self) {
try_(a) {
@@ -2125,9 +2425,10 @@ void ha_pbxt::init_auto_increment(xtWord
if (!TS(table)->next_number_key_offset) {
// Autoincrement at key-start
err = index_last(table->record[1]);
- if (!err)
+ if (!err && !table->next_number_field->is_null(TS(table)->rec_buff_length)) {
/* {PRE-INC} */
nr = (xtWord8) table->next_number_field->val_int_offset(TS(table)->rec_buff_length);
+ }
}
else {
/* Do an index scan to find the largest value! */
@@ -2180,8 +2481,10 @@ void ha_pbxt::init_auto_increment(xtWord
table->next_number_field = tmp_fie;
table->in_use = tmp_thd;
- if (xn_started)
+ if (xn_started) {
+ XT_PRINT0(self, "xt_xn_commit in init_auto_increment\n");
xt_xn_commit(self);
+ }
}
xt_spinlock_unlock(&tab->tab_ainc_lock);
}
@@ -2228,13 +2531,13 @@ void ha_pbxt::get_auto_increment(MX_ULON
* insert into t1 values (-1);
* insert into t1 values (NULL);
*/
-void ha_pbxt::set_auto_increment(Field *nr)
+xtPublic void ha_set_auto_increment(XTOpenTablePtr ot, Field *nr)
{
register XTTableHPtr tab;
MX_ULONGLONG_T nr_int_val;
nr_int_val = nr->val_int();
- tab = pb_open_tab->ot_table;
+ tab = ot->ot_table;
if (nr->cmp((const unsigned char *)&tab->tab_auto_inc) > 0) {
xt_spinlock_lock(&tab->tab_ainc_lock);
@@ -2260,9 +2563,9 @@ void ha_pbxt::set_auto_increment(Field *
#else
tab->tab_dic.dic_min_auto_inc = nr_int_val + 100;
#endif
- pb_open_tab->ot_thread = xt_get_self();
- if (!xt_tab_write_min_auto_inc(pb_open_tab))
- xt_log_and_clear_exception(pb_open_tab->ot_thread);
+ ot->ot_thread = xt_get_self();
+ if (!xt_tab_write_min_auto_inc(ot))
+ xt_log_and_clear_exception(ot->ot_thread);
}
}
}
@@ -2305,7 +2608,7 @@ int ha_pbxt::write_row(byte *buf)
ASSERT_NS(pb_ex_in_use);
- XT_PRINT1(pb_open_tab->ot_thread, "ha_pbxt::write_row %s\n", pb_share->sh_table_path->ps_path);
+ XT_PRINT1(pb_open_tab->ot_thread, "write_row (%s)\n", pb_share->sh_table_path->ps_path);
XT_DISABLED_TRACE(("INSERT tx=%d val=%d\n", (int) pb_open_tab->ot_thread->st_xact_data->xd_start_xn_id, (int) XT_GET_DISK_4(&buf[1])));
//statistic_increment(ha_write_count,&LOCK_status);
#ifdef PBMS_ENABLED
@@ -2350,7 +2653,7 @@ int ha_pbxt::write_row(byte *buf)
err = update_err;
goto done;
}
- set_auto_increment(table->next_number_field);
+ ha_set_auto_increment(pb_open_tab, table->next_number_field);
}
if (!xt_tab_new_record(pb_open_tab, (xtWord1 *) buf)) {
@@ -2423,7 +2726,7 @@ int ha_pbxt::update_row(const byte * old
ASSERT_NS(pb_ex_in_use);
- XT_PRINT1(self, "ha_pbxt::update_row %s\n", pb_share->sh_table_path->ps_path);
+ XT_PRINT1(self, "update_row (%s)\n", pb_share->sh_table_path->ps_path);
XT_DISABLED_TRACE(("UPDATE tx=%d val=%d\n", (int) self->st_xact_data->xd_start_xn_id, (int) XT_GET_DISK_4(&new_data[1])));
//statistic_increment(ha_update_count,&LOCK_status);
@@ -2472,7 +2775,7 @@ int ha_pbxt::update_row(const byte * old
old_map = mx_tmp_use_all_columns(table, table->read_set);
nr = table->found_next_number_field->val_int();
- set_auto_increment(table->found_next_number_field);
+ ha_set_auto_increment(pb_open_tab, table->found_next_number_field);
mx_tmp_restore_column_map(table, old_map);
}
@@ -2504,7 +2807,7 @@ int ha_pbxt::delete_row(const byte * buf
ASSERT_NS(pb_ex_in_use);
- XT_PRINT1(pb_open_tab->ot_thread, "ha_pbxt::delete_row %s\n", pb_share->sh_table_path->ps_path);
+ XT_PRINT1(pb_open_tab->ot_thread, "delete_row (%s)\n", pb_share->sh_table_path->ps_path);
XT_DISABLED_TRACE(("DELETE tx=%d val=%d\n", (int) pb_open_tab->ot_thread->st_xact_data->xd_start_xn_id, (int) XT_GET_DISK_4(&buf[1])));
//statistic_increment(ha_delete_count,&LOCK_status);
@@ -2829,7 +3132,8 @@ int ha_pbxt::xt_index_prev_read(XTOpenTa
int ha_pbxt::index_init(uint idx, bool XT_UNUSED(sorted))
{
- XTIndexPtr ind;
+ XTIndexPtr ind;
+ XTThreadPtr thread = pb_open_tab->ot_thread;
/* select count(*) from smalltab_PBXT;
* ignores the error below, and continues to
@@ -2851,6 +3155,15 @@ int ha_pbxt::index_init(uint idx, bool X
printf("index_init %s index %d cols req=%d/%d read_bits=%X write_bits=%X index_bits=%X\n", pb_open_tab->ot_table->tab_name->ps_path, (int) idx, pb_open_tab->ot_cols_req, pb_open_tab->ot_cols_req, (int) *table->read_set->bitmap, (int) *table->write_set->bitmap, (int) *ind->mi_col_map.bitmap);
#endif
+ /* Start a statement based transaction as soon
+ * as a read is done for a modify type statement!
+ * Previously, this was done too late!
+ */
+ if (!thread->st_stat_trans) {
+ trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
+ XT_PRINT0(thread, "ha_pbxt::update_row trans_register_ha all=FALSE\n");
+ thread->st_stat_trans = TRUE;
+ }
}
else {
pb_open_tab->ot_cols_req = ha_get_max_bit(table->read_set);
@@ -2901,7 +3214,7 @@ int ha_pbxt::index_init(uint idx, bool X
#endif
}
- xt_xlog_check_long_writer(pb_open_tab->ot_thread);
+ xt_xlog_check_long_writer(thread);
pb_open_tab->ot_thread->st_statistics.st_scan_index++;
return 0;
@@ -2911,7 +3224,7 @@ int ha_pbxt::index_end()
{
int err = 0;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
XTThreadPtr thread = pb_open_tab->ot_thread;
@@ -2991,7 +3304,7 @@ int ha_pbxt::index_read_xt(byte * buf, u
ASSERT_NS(pb_ex_in_use);
- XT_PRINT1(pb_open_tab->ot_thread, "ha_pbxt::index_read_xt %s\n", pb_share->sh_table_path->ps_path);
+ XT_PRINT1(pb_open_tab->ot_thread, "index_read_xt (%s)\n", pb_share->sh_table_path->ps_path);
XT_DISABLED_TRACE(("search tx=%d val=%d update=%d\n", (int) pb_open_tab->ot_thread->st_xact_data->xd_start_xn_id, (int) XT_GET_DISK_4(key), pb_modified));
ind = (XTIndexPtr) pb_share->sh_dic_keys[idx];
@@ -3072,7 +3385,7 @@ int ha_pbxt::index_next(byte * buf)
int err = 0;
XTIndexPtr ind;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
//statistic_increment(ha_read_next_count,&LOCK_status);
ASSERT_NS(pb_ex_in_use);
@@ -3114,7 +3427,7 @@ int ha_pbxt::index_next_same(byte * buf,
XTIndexPtr ind;
XTIdxSearchKeyRec search_key;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
//statistic_increment(ha_read_next_count,&LOCK_status);
ASSERT_NS(pb_ex_in_use);
@@ -3154,7 +3467,7 @@ int ha_pbxt::index_prev(byte * buf)
int err = 0;
XTIndexPtr ind;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
//statistic_increment(ha_read_prev_count,&LOCK_status);
ASSERT_NS(pb_ex_in_use);
@@ -3188,7 +3501,7 @@ int ha_pbxt::index_first(byte * buf)
XTIndexPtr ind;
XTIdxSearchKeyRec search_key;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
//statistic_increment(ha_read_first_count,&LOCK_status);
ASSERT_NS(pb_ex_in_use);
@@ -3228,7 +3541,7 @@ int ha_pbxt::index_last(byte * buf)
XTIndexPtr ind;
XTIdxSearchKeyRec search_key;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
//statistic_increment(ha_read_last_count,&LOCK_status);
ASSERT_NS(pb_ex_in_use);
@@ -3275,10 +3588,11 @@ int ha_pbxt::index_last(byte * buf)
*/
int ha_pbxt::rnd_init(bool scan)
{
- int err = 0;
+ int err = 0;
+ XTThreadPtr thread = pb_open_tab->ot_thread;
- XT_PRINT1(pb_open_tab->ot_thread, "ha_pbxt::rnd_init %s\n", pb_share->sh_table_path->ps_path);
- XT_DISABLED_TRACE(("seq scan tx=%d\n", (int) pb_open_tab->ot_thread->st_xact_data->xd_start_xn_id));
+ XT_PRINT1(thread, "rnd_init (%s)\n", pb_share->sh_table_path->ps_path);
+ XT_DISABLED_TRACE(("seq scan tx=%d\n", (int) thread->st_xact_data->xd_start_xn_id));
/* Call xt_tab_seq_exit() to make sure the resources used by the previous
* scan are freed. In particular make sure cache page ref count is decremented.
@@ -3296,8 +3610,18 @@ int ha_pbxt::rnd_init(bool scan)
xt_tab_seq_exit(pb_open_tab);
/* The number of columns required: */
- if (pb_open_tab->ot_is_modify)
+ if (pb_open_tab->ot_is_modify) {
pb_open_tab->ot_cols_req = table->read_set->MX_BIT_SIZE();
+ /* Start a statement based transaction as soon
+ * as a read is done for a modify type statement!
+ * Previously, this was done too late!
+ */
+ if (!thread->st_stat_trans) {
+ trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
+ XT_PRINT0(thread, "ha_pbxt::update_row trans_register_ha all=FALSE\n");
+ thread->st_stat_trans = TRUE;
+ }
+ }
else {
pb_open_tab->ot_cols_req = ha_get_max_bit(table->read_set);
@@ -3322,14 +3646,14 @@ int ha_pbxt::rnd_init(bool scan)
else
xt_tab_seq_reset(pb_open_tab);
- xt_xlog_check_long_writer(pb_open_tab->ot_thread);
+ xt_xlog_check_long_writer(thread);
return err;
}
int ha_pbxt::rnd_end()
{
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
/*
* make permanent the lock for the last scanned row
@@ -3358,7 +3682,7 @@ int ha_pbxt::rnd_next(byte *buf)
int err = 0;
xtBool eof;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
ASSERT_NS(pb_ex_in_use);
//statistic_increment(ha_read_rnd_next_count, &LOCK_status);
xt_xlog_check_long_writer(pb_open_tab->ot_thread);
@@ -3393,7 +3717,7 @@ int ha_pbxt::rnd_next(byte *buf)
*/
void ha_pbxt::position(const byte *XT_UNUSED(record))
{
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
ASSERT_NS(pb_ex_in_use);
/*
* I changed this from using little endian to big endian.
@@ -3429,10 +3753,10 @@ int ha_pbxt::rnd_pos(byte * buf, byte *p
{
int err = 0;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
ASSERT_NS(pb_ex_in_use);
//statistic_increment(ha_read_rnd_count, &LOCK_status);
- XT_PRINT1(pb_open_tab->ot_thread, "ha_pbxt::rnd_pos %s\n", pb_share->sh_table_path->ps_path);
+ XT_PRINT1(pb_open_tab->ot_thread, "rnd_pos (%s)\n", pb_share->sh_table_path->ps_path);
pb_open_tab->ot_curr_rec_id = mi_uint4korr((xtWord1 *) pos);
switch (xt_tab_dirty_read_record(pb_open_tab, (xtWord1 *) buf)) {
@@ -3509,7 +3833,7 @@ int ha_pbxt::info(uint flag)
XTOpenTablePtr ot;
int in_use;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
if (!(in_use = pb_ex_in_use)) {
pb_ex_in_use = 1;
@@ -3535,7 +3859,7 @@ int ha_pbxt::info(uint flag)
stats.index_file_length = xt_ind_node_to_offset(ot->ot_table, ot->ot_table->tab_ind_eof);
stats.delete_length = ot->ot_table->tab_rec_fnum * ot->ot_rec_size;
//check_time = info.check_time;
- stats.mean_rec_length = ot->ot_rec_size;
+ stats.mean_rec_length = (ulong) ot->ot_rec_size;
}
if (flag & HA_STATUS_CONST) {
@@ -3551,7 +3875,9 @@ int ha_pbxt::info(uint flag)
stats.block_size = XT_INDEX_PAGE_SIZE;
if (share->tmp_table == NO_TMP_TABLE)
-#if MYSQL_VERSION_ID > 60005
+#ifdef DRIZZLED
+#define WHICH_MUTEX mutex
+#elif MYSQL_VERSION_ID >= 50404
#define WHICH_MUTEX LOCK_ha_data
#else
#define WHICH_MUTEX mutex
@@ -3559,19 +3885,15 @@ int ha_pbxt::info(uint flag)
#ifdef SAFE_MUTEX
-#if MYSQL_VERSION_ID < 60000
+#if MYSQL_VERSION_ID < 50404
#if MYSQL_VERSION_ID < 50123
safe_mutex_lock(&share->mutex,__FILE__,__LINE__);
#else
safe_mutex_lock(&share->mutex,0,__FILE__,__LINE__);
#endif
#else
-#if MYSQL_VERSION_ID < 60004
- safe_mutex_lock(&share->mutex,__FILE__,__LINE__);
-#else
safe_mutex_lock(&share->WHICH_MUTEX,0,__FILE__,__LINE__);
#endif
-#endif
#else // SAFE_MUTEX
@@ -3675,7 +3997,7 @@ int ha_pbxt::extra(enum ha_extra_functio
{
int err = 0;
- XT_PRINT2(xt_get_self(), "ha_pbxt::extra %s operation=%d\n", pb_share->sh_table_path->ps_path, operation);
+ XT_PRINT2(xt_get_self(), "ha_pbxt::extra (%s) operation=%d\n", pb_share->sh_table_path->ps_path, operation);
switch (operation) {
case HA_EXTRA_RESET_STATE:
@@ -3771,14 +4093,14 @@ int ha_pbxt::extra(enum ha_extra_functio
*/
int ha_pbxt::reset(void)
{
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
extra(HA_EXTRA_RESET_STATE);
XT_RETURN(0);
}
void ha_pbxt::unlock_row()
{
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
if (pb_open_tab)
pb_open_tab->ot_table->tab_locks.xt_remove_temp_lock(pb_open_tab, FALSE);
}
@@ -3802,7 +4124,7 @@ int ha_pbxt::delete_all_rows()
XTDDTable *tab_def = NULL;
char path[PATH_MAX];
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
if (thd_sql_command(thd) != SQLCOM_TRUNCATE) {
/* Just like InnoDB we only handle TRUNCATE TABLE
@@ -3906,7 +4228,7 @@ int ha_pbxt::analyze(THD *thd, HA_CHECK_
xtXactID clean_xn_id = 0;
uint cnt = 10;
- XT_TRACE_CALL();
+ XT_TRACE_METHOD();
if (!pb_open_tab) {
if ((err = reopen()))
@@ -4056,7 +4378,7 @@ xtPublic int ha_pbxt::external_lock(THD
ASSERT_NS(pb_ex_in_use);
*/
- XT_PRINT1(self, "ha_pbxt::EXTERNAL_LOCK %s lock_type=UNLOCK\n", pb_share->sh_table_path->ps_path);
+ XT_PRINT1(self, "EXTERNAL_LOCK (%s) lock_type=UNLOCK\n", pb_share->sh_table_path->ps_path);
/* Make any temporary locks on this table permanent.
*
@@ -4189,10 +4511,9 @@ xtPublic int ha_pbxt::external_lock(THD
xt_broadcast_cond_ns((xt_cond_type *) pb_share->sh_ex_cond);
}
else {
- XT_PRINT2(self, "ha_pbxt::EXTERNAL_LOCK %s lock_type=%d\n", pb_share->sh_table_path->ps_path, lock_type);
+ XT_PRINT2(self, "ha_pbxt::EXTERNAL_LOCK (%s) lock_type=%d\n", pb_share->sh_table_path->ps_path, lock_type);
if (pb_lock_table) {
-
pb_ex_in_use = 1;
try_(a) {
if (!pb_table_locked)
@@ -4243,14 +4564,18 @@ xtPublic int ha_pbxt::external_lock(THD
if ((pb_open_tab->ot_for_update = (lock_type == F_WRLCK))) {
switch ((int) thd_sql_command(thd)) {
case SQLCOM_DELETE:
+#ifndef DRIZZLED
case SQLCOM_DELETE_MULTI:
+#endif
/* turn DELETE IGNORE into normal DELETE. The IGNORE option causes problems because
* when a record is deleted we add an xlog record which we cannot "rollback" later
* when we find that an FK-constraint has failed.
*/
thd->lex->ignore = false;
case SQLCOM_UPDATE:
+#ifndef DRIZZLED
case SQLCOM_UPDATE_MULTI:
+#endif
case SQLCOM_REPLACE:
case SQLCOM_REPLACE_SELECT:
case SQLCOM_INSERT:
@@ -4265,7 +4590,9 @@ xtPublic int ha_pbxt::external_lock(THD
case SQLCOM_DROP_TABLE:
case SQLCOM_DROP_INDEX:
case SQLCOM_LOAD:
+#ifndef DRIZZLED
case SQLCOM_REPAIR:
+#endif
case SQLCOM_OPTIMIZE:
self->st_stat_modify = TRUE;
break;
@@ -4316,11 +4643,16 @@ xtPublic int ha_pbxt::external_lock(THD
self->st_xact_mode = thd_tx_isolation(thd) <= ISO_READ_COMMITTED ? XT_XACT_COMMITTED_READ : XT_XACT_REPEATABLE_READ;
self->st_ignore_fkeys = (thd_test_options(thd,OPTION_NO_FOREIGN_KEY_CHECKS)) != 0;
self->st_auto_commit = (thd_test_options(thd, (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) == 0;
+#ifdef DRIZZLED
+ self->st_table_trans = FALSE;
+#else
self->st_table_trans = thd_sql_command(thd) == SQLCOM_LOCK_TABLES;
+#endif
self->st_abort_trans = FALSE;
self->st_stat_ended = FALSE;
self->st_stat_trans = FALSE;
XT_PRINT0(self, "xt_xn_begin\n");
+ xt_xres_wait_for_recovery(self, XT_RECOVER_SWEPT);
if (!xt_xn_begin(self)) {
err = xt_ha_pbxt_thread_error_for_mysql(thd, self, pb_ignore_dup_key);
pb_ex_in_use = 0;
@@ -4404,7 +4736,7 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
if (!(self = ha_set_current_thread(thd, &err)))
return xt_ha_pbxt_to_mysql_error(err);
- XT_PRINT2(self, "ha_pbxt::start_stmt %s lock_type=%d\n", pb_share->sh_table_path->ps_path, (int) lock_type);
+ XT_PRINT2(self, "ha_pbxt::start_stmt (%s) lock_type=%d\n", pb_share->sh_table_path->ps_path, (int) lock_type);
if (!pb_open_tab) {
if ((err = reopen()))
@@ -4430,12 +4762,12 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
/* This section handles "auto-commit"... */
if (self->st_xact_data && self->st_auto_commit && self->st_table_trans) {
if (self->st_abort_trans) {
- XT_PRINT0(self, "xt_xn_rollback\n");
+ XT_PRINT0(self, "xt_xn_rollback in start_stmt\n");
if (!xt_xn_rollback(self))
err = xt_ha_pbxt_thread_error_for_mysql(pb_mysql_thd, self, pb_ignore_dup_key);
}
else {
- XT_PRINT0(self, "xt_xn_commit\n");
+ XT_PRINT0(self, "xt_xn_commit in start_stmt\n");
if (!xt_xn_commit(self))
err = xt_ha_pbxt_thread_error_for_mysql(pb_mysql_thd, self, pb_ignore_dup_key);
}
@@ -4466,9 +4798,11 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
if (pb_open_tab->ot_for_update) {
switch ((int) thd_sql_command(thd)) {
case SQLCOM_UPDATE:
- case SQLCOM_UPDATE_MULTI:
case SQLCOM_DELETE:
+#ifndef DRIZZLED
+ case SQLCOM_UPDATE_MULTI:
case SQLCOM_DELETE_MULTI:
+#endif
case SQLCOM_REPLACE:
case SQLCOM_REPLACE_SELECT:
case SQLCOM_INSERT:
@@ -4483,14 +4817,15 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
case SQLCOM_DROP_TABLE:
case SQLCOM_DROP_INDEX:
case SQLCOM_LOAD:
+#ifndef DRIZZLED
case SQLCOM_REPAIR:
+#endif
case SQLCOM_OPTIMIZE:
self->st_stat_modify = TRUE;
break;
}
}
-
/* (***) This is required at this level!
* No matter how often it is called, it is still the start of a
* statement. We need to make sure statements that are NOT mistaken
@@ -4516,6 +4851,7 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
self->st_stat_ended = FALSE;
self->st_stat_trans = FALSE;
XT_PRINT0(self, "xt_xn_begin\n");
+ xt_xres_wait_for_recovery(self, XT_RECOVER_SWEPT);
if (!xt_xn_begin(self)) {
err = xt_ha_pbxt_thread_error_for_mysql(thd, self, pb_ignore_dup_key);
goto complete;
@@ -4673,7 +5009,9 @@ THR_LOCK_DATA **ha_pbxt::store_lock(THD
*
*/
if ((lock_type >= TL_WRITE_CONCURRENT_INSERT && lock_type <= TL_WRITE) &&
+#ifndef DRIZZLED
!(thd_in_lock_tables(thd) && thd_sql_command(thd) == SQLCOM_LOCK_TABLES) &&
+#endif
!thd_tablespace_op(thd) &&
thd_sql_command(thd) != SQLCOM_TRUNCATE &&
thd_sql_command(thd) != SQLCOM_OPTIMIZE &&
@@ -4691,22 +5029,23 @@ THR_LOCK_DATA **ha_pbxt::store_lock(THD
* Stewart: removed SQLCOM_CALL, not sure of implications.
*/
- if (lock_type == TL_READ_NO_INSERT &&
- (!thd_in_lock_tables(thd)
+ if (lock_type == TL_READ_NO_INSERT
#ifndef DRIZZLED
+ && (!thd_in_lock_tables(thd)
|| thd_sql_command(thd) == SQLCOM_CALL
+ )
#endif
- ))
+ )
{
lock_type = TL_READ;
}
- XT_PRINT3(xt_get_self(), "ha_pbxt::store_lock %s %d->%d\n", pb_share->sh_table_path->ps_path, pb_lock.type, lock_type);
+ XT_PRINT3(xt_get_self(), "store_lock (%s) %d->%d\n", pb_share->sh_table_path->ps_path, pb_lock.type, lock_type);
pb_lock.type = lock_type;
}
#ifdef PBXT_HANDLER_TRACE
else {
- XT_PRINT3(xt_get_self(), "ha_pbxt::store_lock %s %d->%d (ignore/unlock)\n", pb_share->sh_table_path->ps_path, lock_type, lock_type);
+ XT_PRINT3(xt_get_self(), "store_lock (%s) %d->%d (ignore/unlock)\n", pb_share->sh_table_path->ps_path, lock_type, lock_type);
}
#endif
*to++= &pb_lock;
@@ -4723,15 +5062,23 @@ THR_LOCK_DATA **ha_pbxt::store_lock(THD
* during create if the table_flag HA_DROP_BEFORE_CREATE was specified for
* the storage engine.
*/
+#ifdef DRIZZLED
+int PBXTStorageEngine::doDropTable(Session &, std::string table_path_str)
+#else
int ha_pbxt::delete_table(const char *table_path)
+#endif
{
THD *thd = current_thd;
int err = 0;
XTThreadPtr self = NULL;
XTSharePtr share;
+#ifdef DRIZZLED
+ const char *table_path = table_path_str.c_str();
+#endif
+
STAT_TRACE(self, *thd_query(thd));
- XT_PRINT1(self, "ha_pbxt::delete_table %s\n", table_path);
+ XT_PRINT1(self, "delete_table (%s)\n", table_path);
if (XTSystemTableShare::isSystemTable(table_path))
return delete_system_table(table_path);
@@ -4795,7 +5142,7 @@ int ha_pbxt::delete_table(const char *ta
#endif
}
catch_(a) {
- err = xt_ha_pbxt_thread_error_for_mysql(thd, self, pb_ignore_dup_key);
+ err = xt_ha_pbxt_thread_error_for_mysql(thd, self, FALSE);
#ifdef DRIZZLED
if (err == HA_ERR_NO_SUCH_TABLE)
err = ENOENT;
@@ -4819,7 +5166,11 @@ int ha_pbxt::delete_table(const char *ta
return err;
}
+#ifdef DRIZZLED
+int PBXTStorageEngine::delete_system_table(const char *table_path)
+#else
int ha_pbxt::delete_system_table(const char *table_path)
+#endif
{
THD *thd = current_thd;
XTExceptionRec e;
@@ -4857,7 +5208,13 @@ int ha_pbxt::delete_system_table(const c
* This function can be used to move a table from one database to
* another.
*/
+#ifdef DRIZZLED
+int PBXTStorageEngine::doRenameTable(Session *,
+ const char *from,
+ const char *to)
+#else
int ha_pbxt::rename_table(const char *from, const char *to)
+#endif
{
THD *thd = current_thd;
int err = 0;
@@ -4865,15 +5222,13 @@ int ha_pbxt::rename_table(const char *fr
XTSharePtr share;
XTDatabaseHPtr to_db;
- XT_TRACE_CALL();
-
if (XTSystemTableShare::isSystemTable(from))
return rename_system_table(from, to);
if (!(self = ha_set_current_thread(thd, &err)))
return xt_ha_pbxt_to_mysql_error(err);
- XT_PRINT2(self, "ha_pbxt::rename_table %s -> %s\n", from, to);
+ XT_PRINT2(self, "rename_table (%s -> %s)\n", from, to);
#ifdef PBMS_ENABLED
PBMSResultRec result;
@@ -4929,7 +5284,7 @@ int ha_pbxt::rename_table(const char *fr
#endif
}
catch_(a) {
- err = xt_ha_pbxt_thread_error_for_mysql(thd, self, pb_ignore_dup_key);
+ err = xt_ha_pbxt_thread_error_for_mysql(thd, self, FALSE);
}
cont_(a);
@@ -4940,7 +5295,11 @@ int ha_pbxt::rename_table(const char *fr
XT_RETURN(err);
}
+#ifdef DRIZZLED
+int PBXTStorageEngine::rename_system_table(const char *XT_UNUSED(from), const char *XT_UNUSED(to))
+#else
int ha_pbxt::rename_system_table(const char *XT_UNUSED(from), const char *XT_UNUSED(to))
+#endif
{
return ER_NOT_SUPPORTED_YET;
}
@@ -5029,7 +5388,15 @@ ha_rows ha_pbxt::records_in_range(uint i
* Called from handle.cc by ha_create_table().
*/
+#ifdef DRIZZLED
+int PBXTStorageEngine::doCreateTable(Session *,
+ const char *table_path,
+ Table &table_arg,
+ HA_CREATE_INFO &create_info,
+ drizzled::message::Table &XT_UNUSED(proto))
+#else
int ha_pbxt::create(const char *table_path, TABLE *table_arg, HA_CREATE_INFO *create_info)
+#endif
{
THD *thd = current_thd;
int err = 0;
@@ -5037,37 +5404,61 @@ int ha_pbxt::create(const char *table_pa
XTDDTable *tab_def = NULL;
XTDictionaryRec dic;
- memset(&dic, 0, sizeof(dic));
+ if ((strcmp(table_path, "./pbxt/location") == 0) || (strcmp(table_path, "./pbxt/statistics") == 0))
+ return 0;
- XT_TRACE_CALL();
+ memset(&dic, 0, sizeof(dic));
if (!(self = ha_set_current_thread(thd, &err)))
return xt_ha_pbxt_to_mysql_error(err);
+#ifdef DRIZZLED
+ XT_PRINT2(self, "create (%s) %s\n", table_path, (create_info.options & HA_LEX_CREATE_TMP_TABLE) ? "temporary" : "");
+#else
+ XT_PRINT2(self, "create (%s) %s\n", table_path, (create_info->options & HA_LEX_CREATE_TMP_TABLE) ? "temporary" : "");
+#endif
STAT_TRACE(self, *thd_query(thd));
- XT_PRINT1(self, "ha_pbxt::create %s\n", table_path);
try_(a) {
xt_ha_open_database_of_table(self, (XTPathStrPtr) table_path);
+#ifdef DRIZZLED
+ for (uint i=0; i<TS(&table_arg)->keys; i++) {
+ if (table_arg.key_info[i].key_length > XT_INDEX_MAX_KEY_SIZE)
+ xt_throw_sulxterr(XT_CONTEXT, XT_ERR_KEY_TOO_LARGE, table_arg.key_info[i].name, (u_long) XT_INDEX_MAX_KEY_SIZE);
+ }
+#else
for (uint i=0; i<TS(table_arg)->keys; i++) {
if (table_arg->key_info[i].key_length > XT_INDEX_MAX_KEY_SIZE)
xt_throw_sulxterr(XT_CONTEXT, XT_ERR_KEY_TOO_LARGE, table_arg->key_info[i].name, (u_long) XT_INDEX_MAX_KEY_SIZE);
}
+#endif
/* ($) auto_increment_value will be zero if
* AUTO_INCREMENT is not used. Otherwise
* Query was ALTER TABLE ... AUTO_INCREMENT = x; or
* CREATE TABLE ... AUTO_INCREMENT = x;
*/
+#ifdef DRIZZLED
+ tab_def = xt_ri_create_table(self, true, (XTPathStrPtr) table_path, *thd_query(thd), myxt_create_table_from_table(self, &table_arg));
+ tab_def->checkForeignKeys(self, create_info.options & HA_LEX_CREATE_TMP_TABLE);
+#else
tab_def = xt_ri_create_table(self, true, (XTPathStrPtr) table_path, *thd_query(thd), myxt_create_table_from_table(self, table_arg));
tab_def->checkForeignKeys(self, create_info->options & HA_LEX_CREATE_TMP_TABLE);
+#endif
dic.dic_table = tab_def;
+#ifdef DRIZZLED
+ dic.dic_my_table = &table_arg;
+ dic.dic_tab_flags = (create_info.options & HA_LEX_CREATE_TMP_TABLE) ? XT_TAB_FLAGS_TEMP_TAB : 0;
+ dic.dic_min_auto_inc = (xtWord8) create_info.auto_increment_value; /* ($) */
+ dic.dic_def_ave_row_size = table_arg.s->getAvgRowLength();
+#else
dic.dic_my_table = table_arg;
dic.dic_tab_flags = (create_info->options & HA_LEX_CREATE_TMP_TABLE) ? XT_TAB_FLAGS_TEMP_TAB : 0;
dic.dic_min_auto_inc = (xtWord8) create_info->auto_increment_value; /* ($) */
dic.dic_def_ave_row_size = (xtWord8) table_arg->s->avg_row_length;
+#endif
myxt_setup_dictionary(self, &dic);
/*
@@ -5089,7 +5480,7 @@ int ha_pbxt::create(const char *table_pa
if (tab_def)
tab_def->finalize(self);
dic.dic_table = NULL;
- err = xt_ha_pbxt_thread_error_for_mysql(thd, self, pb_ignore_dup_key);
+ err = xt_ha_pbxt_thread_error_for_mysql(thd, self, FALSE);
}
cont_(a);
@@ -5161,7 +5552,7 @@ bool ha_pbxt::get_error_message(int XT_U
if (!self->t_exception.e_xt_err)
return FALSE;
- buf->copy(self->t_exception.e_err_msg, strlen(self->t_exception.e_err_msg), system_charset_info);
+ buf->copy(self->t_exception.e_err_msg, (uint32) strlen(self->t_exception.e_err_msg), system_charset_info);
return TRUE;
}
@@ -5421,16 +5812,31 @@ static MYSQL_SYSVAR_INT(sweeper_priority
#ifdef DRIZZLED
static MYSQL_SYSVAR_INT(max_threads, pbxt_max_threads,
- PLUGIN_VAR_OPCMDARG,
+ PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
"The maximum number of threads used by PBXT",
NULL, NULL, 500, 20, 20000, 1);
#else
static MYSQL_SYSVAR_INT(max_threads, pbxt_max_threads,
- PLUGIN_VAR_OPCMDARG,
+ PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
"The maximum number of threads used by PBXT, 0 = set according to MySQL max_connections.",
NULL, NULL, 0, 0, 20000, 1);
#endif
+#ifndef DEBUG
+static MYSQL_SYSVAR_BOOL(support_xa, pbxt_support_xa,
+ PLUGIN_VAR_OPCMDARG,
+ "Enable PBXT support for the XA two-phase commit, default is enabled",
+ NULL, NULL, TRUE);
+#else
+static MYSQL_SYSVAR_BOOL(support_xa, pbxt_support_xa,
+ PLUGIN_VAR_OPCMDARG,
+ "Enable PBXT support for the XA two-phase commit, default is disabled (due to assertion failure in MySQL)",
+ /* The problem is, in MySQL an assertion fails in debug mode:
+ * Assertion failed: (total_ha_2pc == (ulong) opt_bin_log+1), function ha_recover, file handler.cc, line 1557.
+ */
+ NULL, NULL, FALSE);
+#endif
+
static struct st_mysql_sys_var* pbxt_system_variables[] = {
MYSQL_SYSVAR(index_cache_size),
MYSQL_SYSVAR(record_cache_size),
@@ -5448,6 +5854,7 @@ static struct st_mysql_sys_var* pbxt_sys
MYSQL_SYSVAR(offline_log_function),
MYSQL_SYSVAR(sweeper_priority),
MYSQL_SYSVAR(max_threads),
+ MYSQL_SYSVAR(support_xa),
NULL
};
#endif
@@ -5494,8 +5901,8 @@ mysql_declare_plugin(pbxt)
"Paul McCullagh, PrimeBase Technologies GmbH",
"PBXT internal system statitics",
PLUGIN_LICENSE_GPL,
- pbxt_init_statitics, /* plugin init */
- pbxt_exit_statitics, /* plugin deinit */
+ pbxt_init_statistics, /* plugin init */
+ pbxt_exit_statistics, /* plugin deinit */
#ifndef DRIZZLED
0x0005,
#endif
=== modified file 'storage/pbxt/src/ha_pbxt.h'
--- a/storage/pbxt/src/ha_pbxt.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/ha_pbxt.h 2009-11-24 10:55:06 +0000
@@ -27,9 +27,9 @@
#ifdef DRIZZLED
#include <drizzled/common.h>
-#include <drizzled/handler.h>
-#include <drizzled/plugin/storage_engine.h>
#include <mysys/thr_lock.h>
+#include <drizzled/cursor.h>
+
#else
#include "mysql_priv.h"
#endif
@@ -53,17 +53,31 @@ class ha_pbxt;
#ifdef DRIZZLED
-class PBXTStorageEngine : public StorageEngine {
+class PBXTStorageEngine : public drizzled::plugin::StorageEngine
+{
+
+ int delete_system_table(const char *table_path);
+ int rename_system_table(const char * from, const char * to);
+
public:
PBXTStorageEngine(std::string name_arg)
- : StorageEngine(name_arg, HTON_NO_FLAGS) {}
+ : drizzled::plugin::StorageEngine(name_arg, HTON_NO_FLAGS) {}
+
+ void operator delete(void *) {}
+ void operator delete[] (void *) {}
/* override */ int close_connection(Session *);
/* override */ int commit(Session *, bool);
/* override */ int rollback(Session *, bool);
- /* override */ handler *create(TABLE_SHARE *, MEM_ROOT *);
+ /* override */ Cursor *create(TABLE_SHARE *, MEM_ROOT *);
/* override */ void drop_database(char *);
/* override */ bool show_status(Session *, stat_print_fn *, enum ha_stat_type);
+ /* override */ const char **bas_ext() const;
+ /* override */ int doCreateTable(Session *session, const char *table_name,
+ Table &table_arg, HA_CREATE_INFO
+ &create_info, drizzled::message::Table &proto);
+ /* override */ int doRenameTable(Session *, const char *from, const char *to);
+ /* override */ int doDropTable(Session &session, std::string table_path);
};
typedef PBXTStorageEngine handlerton;
@@ -139,9 +153,9 @@ class ha_pbxt: public handler
* don't implement this method unless you really have indexes.
*/
const char *index_type(uint inx) { (void) inx; return "BTREE"; }
-
+#ifndef DRIZZLED
const char **bas_ext() const;
-
+#endif
MX_UINT8_T table_cache_type();
/*
@@ -241,11 +255,13 @@ class ha_pbxt: public handler
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
int check(THD* thd, HA_CHECK_OPT* check_opt);
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
- int delete_table(const char *from);
+#ifndef DRIZZLED
int delete_system_table(const char *table_path);
- int rename_table(const char * from, const char * to);
+ int delete_table(const char *from);
int rename_system_table(const char * from, const char * to);
+ int rename_table(const char * from, const char * to);
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info); //required
+#endif
void update_create_info(HA_CREATE_INFO *create_info);
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); //required
@@ -277,6 +293,7 @@ struct XTThread *xt_ha_thd_to_self(THD*
int xt_ha_pbxt_to_mysql_error(int xt_err);
int xt_ha_pbxt_thread_error_for_mysql(THD *thd, const XTThreadPtr self, int ignore_dup_key);
void xt_ha_all_threads_close_database(XTThreadPtr self, XTDatabase *db);
+void ha_set_auto_increment(XTOpenTablePtr ot, Field *nr);
/*
* These hooks are suppossed to only be used by InnoDB:
=== modified file 'storage/pbxt/src/ha_xtsys.h'
--- a/storage/pbxt/src/ha_xtsys.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/ha_xtsys.h 2009-11-24 10:55:06 +0000
@@ -30,8 +30,9 @@
#ifdef DRIZZLED
#include <drizzled/common.h>
-#include <drizzled/handler.h>
+#include <drizzled/handler_structs.h>
#include <drizzled/current_session.h>
+#include <drizzled/cursor.h>
#else
#include "mysql_priv.h"
#endif
=== modified file 'storage/pbxt/src/heap_xt.cc'
--- a/storage/pbxt/src/heap_xt.cc 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/heap_xt.cc 2009-11-24 10:55:06 +0000
@@ -73,7 +73,7 @@ xtPublic void xt_check_heap(XTThreadPtr
}
#ifdef DEBUG_MEMORY
-xtPublic void xt_mm_heap_reference(XTThreadPtr self, XTHeapPtr hp, u_int line, c_char *file)
+xtPublic void xt_mm_heap_reference(XTThreadPtr XT_UNUSED(self), XTHeapPtr hp, u_int line, c_char *file)
#else
xtPublic void xt_heap_reference(XTThreadPtr, XTHeapPtr hp)
#endif
=== modified file 'storage/pbxt/src/index_xt.cc'
--- a/storage/pbxt/src/index_xt.cc 2009-08-18 07:46:53 +0000
+++ b/storage/pbxt/src/index_xt.cc 2009-11-24 10:55:06 +0000
@@ -829,14 +829,25 @@ static void idx_next_branch_item(XTTable
result->sr_item.i_item_offset += result->sr_item.i_item_size + result->sr_item.i_node_ref_size;
bitem = branch->tb_data + result->sr_item.i_item_offset;
- if (ind->mi_fix_key)
- ilen = result->sr_item.i_item_size;
+ if (result->sr_item.i_item_offset < result->sr_item.i_total_size) {
+ if (ind->mi_fix_key)
+ ilen = result->sr_item.i_item_size;
+ else {
+ ilen = myxt_get_key_length(ind, bitem) + XT_RECORD_REF_SIZE;
+ result->sr_item.i_item_size = ilen;
+ }
+ xt_get_res_record_ref(bitem + ilen - XT_RECORD_REF_SIZE, result); /* (Only valid if i_item_offset < i_total_size) */
+ }
else {
- ilen = myxt_get_key_length(ind, bitem) + XT_RECORD_REF_SIZE;
- result->sr_item.i_item_size = ilen;
+ result->sr_item.i_item_size = 0;
+ result->sr_rec_id = 0;
+ result->sr_row_id = 0;
}
- xt_get_res_record_ref(bitem + ilen - XT_RECORD_REF_SIZE, result); /* (Only valid if i_item_offset < i_total_size) */
- result->sr_branch = IDX_GET_NODE_REF(tab, bitem, result->sr_item.i_node_ref_size);
+ if (result->sr_item.i_node_ref_size)
+ /* IDX_GET_NODE_REF() loads the branch reference to the LEFT of the item. */
+ result->sr_branch = IDX_GET_NODE_REF(tab, bitem, result->sr_item.i_node_ref_size);
+ else
+ result->sr_branch = 0;
}
xtPublic void xt_prev_branch_item_fix(XTTableHPtr XT_UNUSED(tab), XTIndexPtr XT_UNUSED(ind), XTIdxBranchDPtr branch, register XTIdxResultRec *result)
@@ -3987,7 +3998,7 @@ xtPublic xtBool xt_flush_indices(XTOpenT
* here.
*/
if (!(tab->tab_dic.dic_tab_flags & XT_TAB_FLAGS_TEMP_TAB)) {
- if (!xt_xlog_flush_log(ot->ot_thread))
+ if (!xt_xlog_flush_log(tab->tab_db, ot->ot_thread))
goto failed_2;
if (!il->il_flush(ot))
goto failed_2;
=== modified file 'storage/pbxt/src/lock_xt.cc'
--- a/storage/pbxt/src/lock_xt.cc 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/lock_xt.cc 2009-11-24 10:55:06 +0000
@@ -1246,7 +1246,7 @@ xtPublic void xt_spinlock_init(XTThreadP
(void) self;
spl->spl_lock = 0;
#ifdef XT_NO_ATOMICS
- xt_init_mutex(self, &spl->spl_mutex);
+ xt_init_mutex_with_autoname(self, &spl->spl_mutex);
#endif
#ifdef DEBUG
spl->spl_locker = 0;
=== modified file 'storage/pbxt/src/locklist_xt.h'
--- a/storage/pbxt/src/locklist_xt.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/locklist_xt.h 2009-11-27 15:37:02 +0000
@@ -24,11 +24,16 @@
#ifndef __xt_locklist_h__
#define __xt_locklist_h__
+/*
+ * XT_THREAD_LOCK_INFO and DEBUG_LOCKING code must be updated to avoid calls to xt_get_self() as it can be called before hton->slot is
+ * assigned by MySQL which is used by xt_get_self()
+ */
+
#ifdef DEBUG
-#define XT_THREAD_LOCK_INFO
+//#define XT_THREAD_LOCK_INFO
#ifndef XT_WIN
/* We need DEBUG_LOCKING in order to enable pthread function wrappers */
-#define DEBUG_LOCKING
+//#define DEBUG_LOCKING
#endif
#endif
=== modified file 'storage/pbxt/src/memory_xt.cc'
--- a/storage/pbxt/src/memory_xt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/memory_xt.cc 2009-11-25 15:06:47 +0000
@@ -34,7 +34,7 @@
#include "trace_xt.h"
#ifdef DEBUG
-//#define RECORD_MM
+#define RECORD_MM
#endif
#ifdef DEBUG
@@ -367,9 +367,8 @@ static long mm_find_pointer(void *ptr)
return(-1);
}
-static long mm_add_pointer(void *ptr, u_int id)
+static long mm_add_pointer(void *ptr, u_int XT_UNUSED(id))
{
-#pragma unused(id)
register int i, n, guess;
if (mm_nr_in_use == mm_total_allocated) {
=== modified file 'storage/pbxt/src/myxt_xt.cc'
--- a/storage/pbxt/src/myxt_xt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/myxt_xt.cc 2009-12-10 11:36:05 +0000
@@ -36,7 +36,7 @@
#include <drizzled/current_session.h>
#include <drizzled/sql_lex.h>
#include <drizzled/session.h>
-extern "C" struct charset_info_st *session_charset(Session *session);
+//extern "C" struct charset_info_st *session_charset(Session *session);
extern pthread_key_t THR_Session;
#else
#include "mysql_priv.h"
@@ -171,7 +171,9 @@ xtPublic u_int myxt_create_key_from_key(
for (u_int i=0; i<ind->mi_seg_count && (int) k_length > 0; i++, old += keyseg->length, keyseg++)
{
+#ifndef DRIZZLED
enum ha_base_keytype type = (enum ha_base_keytype) keyseg->type;
+#endif
u_int length = keyseg->length < k_length ? keyseg->length : k_length;
u_int char_length;
xtWord1 *pos;
@@ -192,14 +194,18 @@ xtPublic u_int myxt_create_key_from_key(
pos = old;
if (keyseg->flag & HA_SPACE_PACK) {
uchar *end = pos + length;
+#ifndef DRIZZLED
if (type != HA_KEYTYPE_NUM) {
+#endif
while (end > pos && end[-1] == ' ')
end--;
+#ifndef DRIZZLED
}
else {
while (pos < end && pos[0] == ' ')
pos++;
}
+#endif
k_length -= length;
length = (u_int) (end-pos);
FIX_LENGTH(cs, pos, length, char_length);
@@ -276,6 +282,7 @@ xtPublic u_int myxt_create_key_from_row(
char_length= ((cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen : length);
pos = record + keyseg->start;
+#ifndef DRIZZLED
if (type == HA_KEYTYPE_BIT)
{
if (keyseg->bit_length)
@@ -289,17 +296,22 @@ xtPublic u_int myxt_create_key_from_row(
key+= length;
continue;
}
+#endif
if (keyseg->flag & HA_SPACE_PACK)
{
end = pos + length;
+#ifndef DRIZZLED
if (type != HA_KEYTYPE_NUM) {
+#endif
while (end > pos && end[-1] == ' ')
end--;
+#ifndef DRIZZLED
}
else {
while (pos < end && pos[0] == ' ')
pos++;
}
+#endif
length = (u_int) (end-pos);
FIX_LENGTH(cs, pos, length, char_length);
store_key_length_inc(key,char_length);
@@ -333,6 +345,7 @@ xtPublic u_int myxt_create_key_from_row(
if (keyseg->flag & HA_SWAP_KEY)
{ /* Numerical column */
#ifdef HAVE_ISNAN
+#ifndef DRIZZLED
if (type == HA_KEYTYPE_FLOAT)
{
float nr;
@@ -345,7 +358,9 @@ xtPublic u_int myxt_create_key_from_row(
continue;
}
}
- else if (type == HA_KEYTYPE_DOUBLE) {
+ else
+#endif
+ if (type == HA_KEYTYPE_DOUBLE) {
double nr;
float8get(nr,pos);
@@ -414,6 +429,7 @@ xtPublic u_int myxt_create_foreign_key_f
char_length= ((cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen : length);
pos = record + keyseg->start;
+#ifndef DRIZZLED
if (type == HA_KEYTYPE_BIT)
{
if (keyseg->bit_length)
@@ -427,17 +443,22 @@ xtPublic u_int myxt_create_foreign_key_f
key+= length;
continue;
}
+#endif
if (keyseg->flag & HA_SPACE_PACK)
{
end = pos + length;
+#ifndef DRIZZLED
if (type != HA_KEYTYPE_NUM) {
+#endif
while (end > pos && end[-1] == ' ')
end--;
+#ifndef DRIZZLED
}
else {
while (pos < end && pos[0] == ' ')
pos++;
}
+#endif
length = (u_int) (end-pos);
FIX_LENGTH(cs, pos, length, char_length);
store_key_length_inc(key,char_length);
@@ -471,6 +492,7 @@ xtPublic u_int myxt_create_foreign_key_f
if (keyseg->flag & HA_SWAP_KEY)
{ /* Numerical column */
#ifdef HAVE_ISNAN
+#ifndef DRIZZLED
if (type == HA_KEYTYPE_FLOAT)
{
float nr;
@@ -483,7 +505,9 @@ xtPublic u_int myxt_create_foreign_key_f
continue;
}
}
- else if (type == HA_KEYTYPE_DOUBLE) {
+ else
+#endif
+ if (type == HA_KEYTYPE_DOUBLE) {
double nr;
float8get(nr,pos);
@@ -622,7 +646,6 @@ static char *mx_get_length_and_data(Fiel
case MYSQL_TYPE_SET:
case MYSQL_TYPE_GEOMETRY:
#else
- case DRIZZLE_TYPE_TINY:
case DRIZZLE_TYPE_LONG:
case DRIZZLE_TYPE_DOUBLE:
case DRIZZLE_TYPE_NULL:
@@ -740,7 +763,6 @@ static void mx_set_length_and_data(Field
case MYSQL_TYPE_SET:
case MYSQL_TYPE_GEOMETRY:
#else
- case DRIZZLE_TYPE_TINY:
case DRIZZLE_TYPE_LONG:
case DRIZZLE_TYPE_DOUBLE:
case DRIZZLE_TYPE_NULL:
@@ -825,6 +847,7 @@ xtPublic xtBool myxt_create_row_from_key
}
record[keyseg->null_pos] &= ~keyseg->null_bit;
}
+#ifndef DRIZZLED
if (keyseg->type == HA_KEYTYPE_BIT)
{
uint length = keyseg->length;
@@ -845,6 +868,7 @@ xtPublic xtBool myxt_create_row_from_key
key+= length;
continue;
}
+#endif
if (keyseg->flag & HA_SPACE_PACK)
{
uint length;
@@ -854,16 +878,20 @@ xtPublic xtBool myxt_create_row_from_key
goto err;
#endif
pos = record+keyseg->start;
+#ifndef DRIZZLED
if (keyseg->type != (int) HA_KEYTYPE_NUM)
{
+#endif
memcpy(pos,key,(size_t) length);
bfill(pos+length,keyseg->length-length,' ');
+#ifndef DRIZZLED
}
else
{
bfill(pos,keyseg->length-length,' ');
memcpy(pos+keyseg->length-length,key,(size_t) length);
}
+#endif
key+=length;
continue;
}
@@ -945,7 +973,7 @@ xtPublic xtBool myxt_create_row_from_key
static int my_compare_bin(uchar *a, uint a_length, uchar *b, uint b_length,
my_bool part_key, my_bool skip_end_space)
{
- uint length= min(a_length,b_length);
+ uint length= a_length < b_length ? a_length : b_length;
uchar *end= a+ length;
int flag;
@@ -1023,6 +1051,7 @@ xtPublic u_int myxt_get_key_length(XTInd
get_key_pack_length(seg_len, pack_len, key_data);
key_data += seg_len;
break;
+#ifndef DRIZZLED
case HA_KEYTYPE_NUM: {
/* Numeric key */
if (keyseg->flag & HA_SPACE_PACK)
@@ -1035,15 +1064,16 @@ xtPublic u_int myxt_get_key_length(XTInd
case HA_KEYTYPE_INT8:
case HA_KEYTYPE_SHORT_INT:
case HA_KEYTYPE_USHORT_INT:
+ case HA_KEYTYPE_INT24:
+ case HA_KEYTYPE_FLOAT:
+ case HA_KEYTYPE_BIT:
+#endif
case HA_KEYTYPE_LONG_INT:
case HA_KEYTYPE_ULONG_INT:
- case HA_KEYTYPE_INT24:
case HA_KEYTYPE_UINT24:
- case HA_KEYTYPE_FLOAT:
case HA_KEYTYPE_DOUBLE:
case HA_KEYTYPE_LONGLONG:
case HA_KEYTYPE_ULONGLONG:
- case HA_KEYTYPE_BIT:
key_data += keyseg->length;
break;
case HA_KEYTYPE_END:
@@ -1190,6 +1220,7 @@ xtPublic int myxt_compare_key(XTIndexPtr
b += b_length;
break;
}
+#ifndef DRIZZLED
case HA_KEYTYPE_INT8:
{
int i_1 = (int) *((signed char *) a);
@@ -1218,6 +1249,7 @@ xtPublic int myxt_compare_key(XTIndexPtr
b += keyseg->length;
break;
}
+#endif
case HA_KEYTYPE_LONG_INT: {
int32 l_1 = sint4korr(a);
int32 l_2 = sint4korr(b);
@@ -1236,6 +1268,7 @@ xtPublic int myxt_compare_key(XTIndexPtr
b += keyseg->length;
break;
}
+#ifndef DRIZZLED
case HA_KEYTYPE_INT24: {
int32 l_1 = sint3korr(a);
int32 l_2 = sint3korr(b);
@@ -1245,6 +1278,7 @@ xtPublic int myxt_compare_key(XTIndexPtr
b += keyseg->length;
break;
}
+#endif
case HA_KEYTYPE_UINT24: {
int32 l_1 = uint3korr(a);
int32 l_2 = uint3korr(b);
@@ -1254,6 +1288,7 @@ xtPublic int myxt_compare_key(XTIndexPtr
b += keyseg->length;
break;
}
+#ifndef DRIZZLED
case HA_KEYTYPE_FLOAT: {
float f_1, f_2;
@@ -1270,6 +1305,7 @@ xtPublic int myxt_compare_key(XTIndexPtr
b += keyseg->length;
break;
}
+#endif
case HA_KEYTYPE_DOUBLE: {
double d_1, d_2;
@@ -1286,6 +1322,7 @@ xtPublic int myxt_compare_key(XTIndexPtr
b += keyseg->length;
break;
}
+#ifndef DRIZZLED
case HA_KEYTYPE_NUM: {
/* Numeric key */
if (keyseg->flag & HA_SPACE_PACK) {
@@ -1339,6 +1376,7 @@ xtPublic int myxt_compare_key(XTIndexPtr
b += b_length;
break;
}
+#endif
#ifdef HAVE_LONG_LONG
case HA_KEYTYPE_LONGLONG: {
longlong ll_a = sint8korr(a);
@@ -1359,9 +1397,11 @@ xtPublic int myxt_compare_key(XTIndexPtr
break;
}
#endif
+#ifndef DRIZZLED
case HA_KEYTYPE_BIT:
/* TODO: What here? */
break;
+#endif
case HA_KEYTYPE_END: /* Ready */
goto end;
}
@@ -1410,16 +1450,19 @@ xtPublic u_int myxt_key_seg_length(XTInd
key_length = has_null + a_length + pack_len;
break;
}
+#ifndef DRIZZLED
case HA_KEYTYPE_INT8:
case HA_KEYTYPE_SHORT_INT:
case HA_KEYTYPE_USHORT_INT:
+ case HA_KEYTYPE_INT24:
+ case HA_KEYTYPE_FLOAT:
+#endif
case HA_KEYTYPE_LONG_INT:
case HA_KEYTYPE_ULONG_INT:
- case HA_KEYTYPE_INT24:
case HA_KEYTYPE_UINT24:
- case HA_KEYTYPE_FLOAT:
case HA_KEYTYPE_DOUBLE:
break;
+#ifndef DRIZZLED
case HA_KEYTYPE_NUM: {
/* Numeric key */
if (keyseg->flag & HA_SPACE_PACK) {
@@ -1428,14 +1471,17 @@ xtPublic u_int myxt_key_seg_length(XTInd
}
break;
}
+#endif
#ifdef HAVE_LONG_LONG
case HA_KEYTYPE_LONGLONG:
case HA_KEYTYPE_ULONGLONG:
break;
#endif
+#ifndef DRIZZLED
case HA_KEYTYPE_BIT:
/* TODO: What here? */
break;
+#endif
case HA_KEYTYPE_END: /* Ready */
break;
}
@@ -1486,7 +1532,7 @@ xtPublic xtWord4 myxt_store_row_length(X
return row_size;
}
-static xtWord4 mx_store_row(XTOpenTablePtr ot, xtWord4 row_size, char *rec_buff)
+xtPublic xtWord4 myxt_store_row_data(XTOpenTablePtr ot, xtWord4 row_size, char *rec_buff)
{
TABLE *table = ot->ot_table->tab_dic.dic_my_table;
char *sdata;
@@ -1614,8 +1660,9 @@ xtPublic size_t myxt_load_row_length(XTO
}
/* Unload from PBXT variable length format to the MySQL row format. */
-xtPublic xtBool myxt_load_row(XTOpenTablePtr ot, xtWord1 *source_buf, xtWord1 *dest_buff, u_int col_cnt)
+xtPublic xtWord4 myxt_load_row_data(XTOpenTablePtr ot, xtWord1 *source_buf, xtWord1 *dest_buff, u_int col_cnt)
{
+ xtWord1 *input_buf = source_buf;
TABLE *table;
xtWord4 len;
Field *curr_field;
@@ -1624,7 +1671,7 @@ xtPublic xtBool myxt_load_row(XTOpenTabl
if (!(table = ot->ot_table->tab_dic.dic_my_table)) {
xt_register_taberr(XT_REG_CONTEXT, XT_ERR_NO_DICTIONARY, ot->ot_table->tab_name);
- return FAILED;
+ return 0;
}
/* According to the InnoDB implementation:
@@ -1657,7 +1704,7 @@ xtPublic xtBool myxt_load_row(XTOpenTabl
default: // Length byte
if (*source_buf > 240) {
xt_register_xterr(XT_REG_CONTEXT, XT_ERR_BAD_RECORD_FORMAT);
- return FAILED;
+ return 0;
}
len = *source_buf;
source_buf++;
@@ -1671,7 +1718,12 @@ xtPublic xtBool myxt_load_row(XTOpenTabl
source_buf += len;
}
- return OK;
+ return (xtWord4) (source_buf - input_buf);
+}
+
+xtPublic xtBool myxt_load_row(XTOpenTablePtr ot, xtWord1 *source_buf, xtWord1 *dest_buff, u_int col_cnt)
+{
+ return myxt_load_row_data(ot, source_buf, dest_buff, col_cnt) != 0;
}
xtPublic xtBool myxt_find_column(XTOpenTablePtr ot, u_int *col_idx, const char *col_name)
@@ -1784,7 +1836,7 @@ xtPublic xtBool myxt_store_row(XTOpenTab
else {
xtWord4 row_size;
- if (!(row_size = mx_store_row(ot, XT_REC_EXT_HEADER_SIZE, rec_buff)))
+ if (!(row_size = myxt_store_row_data(ot, XT_REC_EXT_HEADER_SIZE, rec_buff)))
return FAILED;
if (row_size - XT_REC_FIX_EXT_HEADER_DIFF <= ot->ot_rec_size) {
rec_info->ri_fix_rec_buf = (XTTabRecFixDPtr) &ot->ot_row_wbuffer[XT_REC_FIX_EXT_HEADER_DIFF];
@@ -1951,7 +2003,7 @@ static TABLE *my_open_table(XTThreadPtr
#ifdef DRIZZLED
share->init(db_name, 0, name, path);
- if ((error = open_table_def(thd, share)) ||
+ if ((error = open_table_def(*thd, share)) ||
(error = open_table_from_share(thd, share, "", 0, (uint32_t) READ_ALL, 0, table, OTM_OPEN)))
{
xt_free(self, table);
@@ -1995,7 +2047,7 @@ static TABLE *my_open_table(XTThreadPtr
return NULL;
}
-#if MYSQL_VERSION_ID >= 60003
+#if MYSQL_VERSION_ID >= 50404
if ((error = open_table_from_share(thd, share, "", 0, (uint) READ_ALL, 0, table, OTM_OPEN)))
#else
if ((error = open_table_from_share(thd, share, "", 0, (uint) READ_ALL, 0, table, FALSE)))
@@ -2145,7 +2197,10 @@ static XTIndexPtr my_create_index(XTThre
if (options & HA_OPTION_PACK_KEYS ||
(index->flags & (HA_PACK_KEY | HA_BINARY_PACK_KEY | HA_SPACE_PACK_USED)))
{
- if (key_part->length > 8 && (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_NUM ||
+ if (key_part->length > 8 && (type == HA_KEYTYPE_TEXT ||
+#ifndef DRIZZLED
+ type == HA_KEYTYPE_NUM ||
+#endif
(type == HA_KEYTYPE_BINARY && !field->zero_pack())))
{
/* No blobs here */
@@ -2213,8 +2268,12 @@ static XTIndexPtr my_create_index(XTThre
else if (field->type() == MYSQL_TYPE_ENUM) {
switch (seg->length) {
case 2:
+#ifdef DRIZZLED
+ ASSERT_NS(FALSE);
+#else
seg->type = HA_KEYTYPE_USHORT_INT;
break;
+#endif
case 3:
seg->type = HA_KEYTYPE_UINT24;
break;
@@ -2675,7 +2734,11 @@ xtPublic xtBool myxt_load_dictionary(XTT
if (!(my_tab = my_open_table(self, db, tab_path)))
return FAILED;
dic->dic_my_table = my_tab;
+#ifdef DRIZZLED
+ dic->dic_def_ave_row_size = (xtWord8) my_tab->s->getAvgRowLength();
+#else
dic->dic_def_ave_row_size = (xtWord8) my_tab->s->avg_row_length;
+#endif
myxt_setup_dictionary(self, dic);
dic->dic_keys = (XTIndexPtr *) xt_calloc(self, sizeof(XTIndexPtr) * TS(my_tab)->keys);
for (uint i=0; i<TS(my_tab)->keys; i++)
@@ -2805,8 +2868,10 @@ static void ha_create_dd_index(XTThreadP
static char *my_type_to_string(XTThreadPtr self, Field *field, TABLE *XT_UNUSED(my_tab))
{
- char buffer[MAX_FIELD_WIDTH + 400], *ptr;
+ char buffer[MAX_FIELD_WIDTH + 400];
+ const char *ptr;
String type((char *) buffer, sizeof(buffer), system_charset_info);
+ xtWord4 len;
/* GOTCHA:
* - Above sets the string length to the same as the buffer,
@@ -2817,10 +2882,17 @@ static char *my_type_to_string(XTThreadP
*/
type.length(0);
field->sql_type(type);
- ptr = type.c_ptr();
+ ptr = type.ptr();
+ len = type.length();
+
+ if (len >= sizeof(buffer))
+ len = sizeof(buffer)-1;
+
if (ptr != buffer)
- xt_strcpy(sizeof(buffer), buffer, ptr);
+ xt_strcpy(sizeof(buffer), buffer, ptr);
+ buffer[len] = 0;
+
if (field->has_charset()) {
/* Always include the charset so that we can compare types
* for FK/PK releations.
@@ -2877,6 +2949,10 @@ xtPublic XTDDTable *myxt_create_table_fr
xtPublic void myxt_static_convert_identifier(XTThreadPtr XT_UNUSED(self), MX_CHARSET_INFO *cs, char *from, char *to, size_t to_len)
{
+#ifdef DRIZZLED
+ ((void *)cs);
+ xt_strcpy(to_len, to, from);
+#else
uint errors;
/*
@@ -2888,11 +2964,16 @@ xtPublic void myxt_static_convert_identi
xt_strcpy(to_len, to, from);
else
strconvert(cs, from, &my_charset_utf8_general_ci, to, to_len, &errors);
+#endif
}
// cs == current_thd->charset()
xtPublic char *myxt_convert_identifier(XTThreadPtr self, MX_CHARSET_INFO *cs, char *from)
{
+#ifdef DRIZZLED
+ char *to = xt_dup_string(self, from);
+ ((void *)cs);
+#else
uint errors;
u_int len;
char *to;
@@ -2904,6 +2985,7 @@ xtPublic char *myxt_convert_identifier(X
to = (char *) xt_malloc(self, len);
strconvert(cs, from, &my_charset_utf8_general_ci, to, len, &errors);
}
+#endif
return to;
}
@@ -2954,9 +3036,9 @@ xtPublic MX_CHARSET_INFO *myxt_getcharse
THD *thd = current_thd;
if (thd)
- return thd_charset(thd);
+ return (MX_CHARSET_INFO *)thd_charset(thd);
}
- return &my_charset_utf8_general_ci;
+ return (MX_CHARSET_INFO *)&my_charset_utf8_general_ci;
}
xtPublic void *myxt_create_thread()
@@ -3011,12 +3093,26 @@ xtPublic void *myxt_create_thread()
return NULL;
}
- if (!(new_thd = new THD())) {
+ if (!(new_thd = new THD)) {
my_thread_end();
xt_register_error(XT_REG_CONTEXT, XT_ERR_MYSQL_ERROR, 0, "Unable to create MySQL thread (THD)");
return NULL;
}
+ /*
+ * If PBXT is the default storage engine, then creating any THD objects will add extra
+ * references to the PBXT plugin object. because the threads are created but PBXT
+ * this creates a self reference, and the reference count does not go to zero
+ * on shutdown.
+ *
+ * The server then issues a message that it is forcing shutdown of the plugin.
+ *
+ * However, the engine reference is not required by the THDs used by PBXT, so
+ * I just remove them here.
+ */
+ plugin_unlock(NULL, new_thd->variables.table_plugin);
+ new_thd->variables.table_plugin = NULL;
+
new_thd->thread_stack = (char *) &new_thd;
new_thd->store_globals();
lex_start(new_thd);
@@ -3051,7 +3147,7 @@ xtPublic void myxt_destroy_thread(void *
#else
close_thread_tables(thd);
#endif
-
+
delete thd;
/* Remember that we don't have a THD */
@@ -3128,11 +3224,12 @@ xtPublic int myxt_statistics_fill_table(
const char *stat_name;
u_llong stat_value;
XTStatisticsRec statistics;
+ XTDatabaseHPtr db = self->st_database;
xt_gather_statistics(&statistics);
for (u_int rec_id=0; !err && rec_id<XT_STAT_CURRENT_MAX; rec_id++) {
stat_name = xt_get_stat_meta_data(rec_id)->sm_name;
- stat_value = xt_get_statistic(&statistics, self->st_database, rec_id);
+ stat_value = xt_get_statistic(&statistics, db, rec_id);
col=0;
mx_put_u_llong(table, col++, rec_id+1);
@@ -3213,19 +3310,31 @@ static void myxt_bitmap_init(XTThreadPtr
my_bitmap_map *buf;
uint size_in_bytes = (((n_bits) + 31) / 32) * 4;
- buf = (my_bitmap_map *) xt_malloc(self, size_in_bytes);
+ buf = (my_bitmap_map *) xt_malloc(self, size_in_bytes);
+
+#ifdef DRIZZLED
+ map->init(buf, n_bits);
+#else
map->bitmap= buf;
map->n_bits= n_bits;
create_last_word_mask(map);
bitmap_clear_all(map);
+#endif
}
static void myxt_bitmap_free(XTThreadPtr self, MX_BITMAP *map)
{
+#ifdef DRIZZLED
+ my_bitmap_map *buf = map->getBitmap();
+ if (buf)
+ xt_free(self, buf);
+ map->setBitmap(NULL);
+#else
if (map->bitmap) {
xt_free(self, map->bitmap);
map->bitmap = NULL;
}
+#endif
}
/*
@@ -3269,3 +3378,29 @@ XTDDColumn *XTDDColumnFactory::createFro
return col;
}
+/*
+ * -----------------------------------------------------------------------
+ * utilities
+ */
+
+/*
+ * MySQL (not sure about Drizzle) first calls hton->init and then assigns the plugin a thread slot
+ * which is used by xt_get_self(). This is a problem as pbxt_init() starts a number of daemon threads
+ * which could try to use the slot before it is assigned. This code waits till slot is inited.
+ * We cannot directly check hton->slot as in some versions of MySQL it can be 0 before init which is a
+ * valid value.
+ */
+extern ulong total_ha;
+
+xtPublic void myxt_wait_pbxt_plugin_slot_assigned(XTThread *self)
+{
+#ifdef DRIZZLED
+ static LEX_STRING plugin_name = { C_STRING_WITH_LEN("PBXT") };
+
+ while (!self->t_quit && !Registry::singleton().find(&plugin_name))
+ xt_sleep_milli_second(1);
+#else
+ while(!self->t_quit && (pbxt_hton->slot >= total_ha))
+ xt_sleep_milli_second(1);
+#endif
+}
=== modified file 'storage/pbxt/src/myxt_xt.h'
--- a/storage/pbxt/src/myxt_xt.h 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/myxt_xt.h 2009-11-27 15:37:02 +0000
@@ -52,8 +52,10 @@ void myxt_set_default_row_from_key(XTOp
void myxt_print_key(XTIndexPtr ind, xtWord1 *key_value);
xtWord4 myxt_store_row_length(XTOpenTablePtr ot, char *rec_buff);
+xtWord4 myxt_store_row_data(XTOpenTablePtr ot, xtWord4 row_size, char *rec_buff);
xtBool myxt_store_row(XTOpenTablePtr ot, XTTabRecInfoPtr rec_info, char *rec_buff);
size_t myxt_load_row_length(XTOpenTablePtr ot, size_t buffer_size, xtWord1 *source_buf, u_int *ret_col_cnt);
+xtWord4 myxt_load_row_data(XTOpenTablePtr ot, xtWord1 *source_buf, xtWord1 *dest_buff, u_int col_cnt);
xtBool myxt_load_row(XTOpenTablePtr ot, xtWord1 *source_buf, xtWord1 *dest_buff, u_int col_cnt);
xtBool myxt_find_column(XTOpenTablePtr ot, u_int *col_idx, const char *col_name);
void myxt_get_column_name(XTOpenTablePtr ot, u_int col_idx, u_int len, char *col_name);
@@ -93,4 +95,6 @@ public:
static XTDDColumn *createFromMySQLField(XTThread *self, STRUCT_TABLE *, Field *);
};
+void myxt_wait_pbxt_plugin_slot_assigned(XTThread *self);
+
#endif
=== modified file 'storage/pbxt/src/pbms.h'
--- a/storage/pbxt/src/pbms.h 2009-08-18 07:46:53 +0000
+++ b/storage/pbxt/src/pbms.h 2009-11-24 10:55:06 +0000
@@ -344,16 +344,16 @@ public:
int couldBeURL(char *blob_url, int size)
{
if (blob_url && (size < PBMS_BLOB_URL_SIZE)) {
- char buffer[PBMS_BLOB_URL_SIZE+1];
- u_int32_t db_id = 0;
- u_int32_t tab_id = 0;
- u_int64_t blob_id = 0;
- u_int64_t blob_ref_id = 0;
- u_int64_t blob_size = 0;
- u_int32_t auth_code = 0;
- u_int32_t server_id = 0;
- char type, junk[5];
- int scanned;
+ char buffer[PBMS_BLOB_URL_SIZE+1];
+ unsigned long db_id = 0;
+ unsigned long tab_id = 0;
+ unsigned long long blob_id = 0;
+ unsigned long long blob_ref_id = 0;
+ unsigned long long blob_size = 0;
+ unsigned long auth_code = 0;
+ unsigned long server_id = 0;
+ char type, junk[5];
+ int scanned;
junk[0] = 0;
if (blob_url[size]) { // There is no guarantee that the URL will be null terminated.
@@ -364,12 +364,12 @@ public:
scanned = sscanf(blob_url, URL_FMT"%4s", &db_id, &type, &tab_id, &blob_id, &auth_code, &server_id, &blob_ref_id, &blob_size, junk);
if (scanned != 8) {// If junk is found at the end this will also result in an invalid URL.
- printf("Bad URL \"%s\": scanned = %d, junk: %d, %d, %d, %d\n", blob_url, scanned, junk[0], junk[1], junk[2], junk[3]);
+ printf("Bad URL \"%s\": scanned = %d, junk: %d, %d, %d, %d\n", blob_url, scanned, junk[0], junk[1], junk[2], junk[3]);
return 0;
}
if (junk[0] || (type != '~' && type != '_')) {
- printf("Bad URL \"%s\": scanned = %d, junk: %d, %d, %d, %d\n", blob_url, scanned, junk[0], junk[1], junk[2], junk[3]);
+ printf("Bad URL \"%s\": scanned = %d, junk: %d, %d, %d, %d\n", blob_url, scanned, junk[0], junk[1], junk[2], junk[3]);
return 0;
}
=== modified file 'storage/pbxt/src/pbms_enabled.cc'
--- a/storage/pbxt/src/pbms_enabled.cc 2009-10-06 15:16:01 +0000
+++ b/storage/pbxt/src/pbms_enabled.cc 2009-11-24 10:55:06 +0000
@@ -29,15 +29,10 @@
*
*/
-/*
- The following two lines backported by psergey. Remove them when we merge from PBXT again.
-*/
#include "xt_config.h"
-#ifdef PBMS_ENABLED
-#define PBMS_API pbms_enabled_api
+#ifdef PBMS_ENABLED
-#include "pbms_enabled.h"
#ifdef DRIZZLED
#include <sys/stat.h>
#include <drizzled/common_includes.h>
@@ -47,11 +42,15 @@
#include <mysql/plugin.h>
#define session_alloc(sess, size) thd_alloc(sess, size);
#define current_session current_thd
-#endif
+#endif
-#define GET_BLOB_FIELD(t, i) (Field_blob *)(t->field[t->s->blob_field[i]])
-#define DB_NAME(f) (f->table->s->db.str)
-#define TAB_NAME(f) (*(f->table_name))
+#define GET_BLOB_FIELD(t, i) (Field_blob *)(t->field[t->s->blob_field[i]])
+#define DB_NAME(f) (f->table->s->db.str)
+#define TAB_NAME(f) (*(f->table_name))
+
+#define PBMS_API pbms_enabled_api
+
+#include "pbms_enabled.h"
static PBMS_API pbms_api;
@@ -242,4 +241,4 @@ void pbms_completed(TABLE *table, bool o
return ;
}
-#endif
\ No newline at end of file
+#endif // PBMS_ENABLED
=== modified file 'storage/pbxt/src/pbms_enabled.h'
--- a/storage/pbxt/src/pbms_enabled.h 2009-08-18 07:46:53 +0000
+++ b/storage/pbxt/src/pbms_enabled.h 2009-11-24 10:55:06 +0000
@@ -35,13 +35,6 @@
#include "pbms.h"
-#ifdef DRIZZLED
-#include <drizzled/server_includes.h>
-#define TABLE Table
-#else
-#include <mysql_priv.h>
-#endif
-
/*
* pbms_initialize() should be called from the engines plugIn's 'init()' function.
* The engine_name is the name of your engine, "PBXT" or "InnoDB" for example.
=== modified file 'storage/pbxt/src/pthread_xt.cc'
--- a/storage/pbxt/src/pthread_xt.cc 2009-08-18 07:46:53 +0000
+++ b/storage/pbxt/src/pthread_xt.cc 2009-11-24 10:55:06 +0000
@@ -578,8 +578,8 @@ xtPublic int xt_p_mutex_unlock(xt_mutex_
xtPublic int xt_p_mutex_destroy(xt_mutex_type *mutex)
{
- ASSERT_NS(mutex->mu_init == 12345);
- mutex->mu_init = 89898;
+ //ASSERT_NS(mutex->mu_init == 12345);
+ mutex->mu_init = 11111;
#ifdef XT_THREAD_LOCK_INFO
xt_thread_lock_info_free(&mutex->mu_lock_info);
#endif
=== modified file 'storage/pbxt/src/restart_xt.cc'
--- a/storage/pbxt/src/restart_xt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/restart_xt.cc 2009-11-27 15:37:02 +0000
@@ -34,12 +34,16 @@
#include "ha_pbxt.h"
+#ifdef DRIZZLED
+#include <drizzled/data_home.h>
+using drizzled::plugin::Registry;
+#endif
+
#include "xactlog_xt.h"
#include "database_xt.h"
#include "util_xt.h"
#include "strutil_xt.h"
#include "filesys_xt.h"
-#include "restart_xt.h"
#include "myxt_xt.h"
#include "trace_xt.h"
@@ -57,13 +61,27 @@
//#define PRINTF xt_ftracef
//#define PRINTF xt_trace
-void xt_print_bytes(xtWord1 *buf, u_int len)
+/*
+ * -----------------------------------------------------------------------
+ * GLOBALS
+ */
+
+xtPublic int pbxt_recovery_state;
+
+/*
+ * -----------------------------------------------------------------------
+ * UTILITIES
+ */
+
+#ifdef TRACE_RECORD_DATA
+static void xt_print_bytes(xtWord1 *buf, u_int len)
{
for (u_int i=0; i<len; i++) {
PRINTF("%02x ", (u_int) *buf);
buf++;
}
}
+#endif
void xt_print_log_record(xtLogID log, xtLogOffset offset, XTXactLogBufferDPtr record)
{
@@ -252,7 +270,7 @@ void xt_print_log_record(xtLogID log, xt
rec_type = "DELETE";
break;
case XT_LOG_ENT_DELETE_FL:
- rec_type = "DELETE-FL-BG";
+ rec_type = "DELETE-FL";
break;
case XT_LOG_ENT_UPDATE_BG:
rec_type = "UPDATE-BG";
@@ -320,6 +338,11 @@ void xt_print_log_record(xtLogID log, xt
case XT_LOG_ENT_END_OF_LOG:
rec_type = "END OF LOG";
break;
+ case XT_LOG_ENT_PREPARE:
+ rec_type = "PREPARE";
+ xn_id = XT_GET_DISK_4(record->xp.xp_xact_id_4);
+ xn_set = TRUE;
+ break;
}
if (log)
@@ -327,6 +350,8 @@ void xt_print_log_record(xtLogID log, xt
PRINTF("%s ", rec_type);
if (type)
PRINTF("op=%lu tab=%lu %s=%lu ", (u_long) op_no, (u_long) tab_id, type, (u_long) rec_id);
+ else if (tab_id)
+ PRINTF("tab=%lu ", (u_long) tab_id);
if (row_id)
PRINTF("row=%lu ", (u_long) row_id);
if (log_id)
@@ -459,6 +484,7 @@ static xtBool xres_open_table(XTThreadPt
}
return OK;
}
+
ws->ws_tab_gone = tab_id;
return FAILED;
}
@@ -629,6 +655,7 @@ static void xres_apply_change(XTThreadPt
xtWord1 *rec_data = NULL;
XTTabRecFreeDPtr free_data;
+ ASSERT(ot->ot_thread == self);
if (tab->tab_dic.dic_key_count == 0)
check_index = FALSE;
@@ -1300,7 +1327,7 @@ static void xres_apply_operations(XTThre
* These operations are applied even though operations
* in sequence are missing.
*/
-xtBool xres_sync_operations(XTThreadPtr self, XTDatabaseHPtr db, XTWriterStatePtr ws)
+static xtBool xres_sync_operations(XTThreadPtr self, XTDatabaseHPtr db, XTWriterStatePtr ws)
{
u_int edx;
XTTableEntryPtr te_ptr;
@@ -1881,15 +1908,6 @@ xtBool XTXactRestart::xres_check_checksu
void XTXactRestart::xres_recover_progress(XTThreadPtr self, XTOpenFilePtr *of, int perc)
{
#ifdef XT_USE_GLOBAL_DB
- if (!perc) {
- char file_path[PATH_MAX];
-
- xt_strcpy(PATH_MAX, file_path, xres_db->db_main_path);
- xt_add_pbxt_file(PATH_MAX, file_path, "recovery-progress");
- *of = xt_open_file(self, file_path, XT_FS_CREATE | XT_FS_MAKE_PATH);
- xt_set_eof_file(self, *of, 0);
- }
-
if (perc > 100) {
char file_path[PATH_MAX];
@@ -1905,6 +1923,15 @@ void XTXactRestart::xres_recover_progres
else {
char number[40];
+ if (!*of) {
+ char file_path[PATH_MAX];
+
+ xt_strcpy(PATH_MAX, file_path, xres_db->db_main_path);
+ xt_add_pbxt_file(PATH_MAX, file_path, "recovery-progress");
+ *of = xt_open_file(self, file_path, XT_FS_CREATE | XT_FS_MAKE_PATH);
+ xt_set_eof_file(self, *of, 0);
+ }
+
sprintf(number, "%d", perc);
if (!xt_pwrite_file(*of, 0, strlen(number), number, &self->st_statistics.st_x, self))
xt_throw(self);
@@ -1927,10 +1954,11 @@ xtBool XTXactRestart::xres_restart(XTThr
off_t bytes_to_read;
volatile xtBool print_progress = FALSE;
volatile off_t perc_size = 0, next_goal = 0;
- int perc_complete = 1;
+ int perc_complete = 1, perc_to_write = 1;
XTOpenFilePtr progress_file = NULL;
xtBool min_ram_xn_id_set = FALSE;
u_int log_count;
+ time_t start_time;
memset(&ws, 0, sizeof(ws));
@@ -1955,12 +1983,11 @@ xtBool XTXactRestart::xres_restart(XTThr
/* Don't print anything about recovering an empty database: */
if (bytes_to_read != 0)
xt_logf(XT_NT_INFO, "PBXT: Recovering from %lu-%llu, bytes to read: %llu\n", (u_long) xres_cp_log_id, (u_llong) xres_cp_log_offset, (u_llong) bytes_to_read);
- if (bytes_to_read >= 10*1024*1024) {
- print_progress = TRUE;
- perc_size = bytes_to_read / 100;
- next_goal = perc_size;
- xres_recover_progress(self, &progress_file, 0);
- }
+
+ print_progress = FALSE;
+ start_time = time(NULL);
+ perc_size = bytes_to_read / 100;
+ next_goal = perc_size;
if (!db->db_xlog.xlog_seq_start(&ws.ws_seqread, xres_cp_log_id, xres_cp_log_offset, FALSE)) {
ok = FALSE;
@@ -1983,17 +2010,28 @@ xtBool XTXactRestart::xres_restart(XTThr
#ifdef PRINT_LOG_ON_RECOVERY
xt_print_log_record(ws.ws_seqread.xseq_rec_log_id, ws.ws_seqread.xseq_rec_log_offset, record);
#endif
- if (print_progress && bytes_read > next_goal) {
- if (((perc_complete - 1) % 25) == 0)
- xt_logf(XT_NT_INFO, "PBXT: ");
- if ((perc_complete % 25) == 0)
- xt_logf(XT_NT_INFO, "%2d\n", (int) perc_complete);
- else
- xt_logf(XT_NT_INFO, "%2d ", (int) perc_complete);
- xt_log_flush(self);
- xres_recover_progress(self, &progress_file, perc_complete);
- next_goal += perc_size;
- perc_complete++;
+ if (bytes_read >= next_goal) {
+ while (bytes_read >= next_goal) {
+ next_goal += perc_size;
+ perc_complete++;
+ }
+ if (!print_progress) {
+ if (time(NULL) - start_time > 2)
+ print_progress = TRUE;
+ }
+ if (print_progress) {
+ while (perc_to_write < perc_complete) {
+ if (((perc_to_write - 1) % 25) == 0)
+ xt_logf(XT_NT_INFO, "PBXT: ");
+ if ((perc_to_write % 25) == 0)
+ xt_logf(XT_NT_INFO, "%2d\n", (int) perc_to_write);
+ else
+ xt_logf(XT_NT_INFO, "%2d ", (int) perc_to_write);
+ xt_log_flush(self);
+ xres_recover_progress(self, &progress_file, perc_to_write);
+ perc_to_write++;
+ }
+ }
}
switch (record->xl.xl_status_1) {
case XT_LOG_ENT_HEADER:
@@ -2053,8 +2091,11 @@ xtBool XTXactRestart::xres_restart(XTThr
xact->xd_end_xn_id = xn_id;
xact->xd_flags |= XT_XN_XAC_ENDED | XT_XN_XAC_SWEEP;
xact->xd_flags &= ~XT_XN_XAC_RECOVERED; // We can expect an end record on cleanup!
+ xact->xd_flags &= ~XT_XN_XAC_PREPARED; // Prepared transactions cannot be swept!
if (record->xl.xl_status_1 == XT_LOG_ENT_COMMIT)
xact->xd_flags |= XT_XN_XAC_COMMITTED;
+ if (xt_sl_get_size(db->db_xn_xa_list) > 0)
+ xt_xn_delete_xa_data_by_xact(db, xn_id, self);
}
break;
case XT_LOG_ENT_CLEANUP:
@@ -2071,6 +2112,14 @@ xtBool XTXactRestart::xres_restart(XTThr
rec_log_id = XT_GET_DISK_4(record->xl.xl_log_id_4);
xt_dl_set_to_delete(self, db, rec_log_id);
break;
+ case XT_LOG_ENT_PREPARE:
+ xn_id = XT_GET_DISK_4(record->xp.xp_xact_id_4);
+ if ((xact = xt_xn_get_xact(db, xn_id, self))) {
+ xact->xd_flags |= XT_XN_XAC_PREPARED;
+ if (!xt_xn_store_xa_data(db, xn_id, record->xp.xp_xa_len_1, record->xp.xp_xa_data, self))
+ xt_throw(self);
+ }
+ break;
default:
xt_xres_apply_in_order(self, &ws, ws.ws_seqread.xseq_rec_log_id, ws.ws_seqread.xseq_rec_log_offset, record);
break;
@@ -2534,7 +2583,8 @@ static void xres_cp_main(XTThreadPtr sel
/* This condition means we could checkpoint: */
if (!(xt_sl_get_size(db->db_datalogs.dlc_to_delete) == 0 &&
xt_sl_get_size(db->db_datalogs.dlc_deleted) == 0 &&
- xt_comp_log_pos(log_id, log_offset, db->db_restart.xres_cp_log_id, db->db_restart.xres_cp_log_offset) <= 0))
+ xt_comp_log_pos(log_id, log_offset, db->db_restart.xres_cp_log_id, db->db_restart.xres_cp_log_offset) <= 0) &&
+ xt_sl_get_size(db->db_xn_xa_list) == 0)
break;
xres_cp_wait_for_log_writer(self, db, 400);
@@ -2654,7 +2704,7 @@ xtPublic xtBool xt_begin_checkpoint(XTDa
* until they are flushed.
*/
/* This is an alternative to the above.
- if (!xt_xlog_flush_log(self))
+ if (!xt_xlog_flush_log(db, self))
xt_throw(self);
*/
xt_lock_mutex_ns(&db->db_wr_lock);
@@ -2776,6 +2826,14 @@ xtPublic xtBool xt_end_checkpoint(XTData
size_t chk_size = 0;
u_int no_of_logs = 0;
+ /* As long as we have outstanding XA transactions, we may not checkpoint! */
+ if (xt_sl_get_size(db->db_xn_xa_list) > 0) {
+#ifdef DEBUG
+ printf("Checkpoint must wait\n");
+#endif
+ return OK;
+ }
+
#ifdef NEVER_CHECKPOINT
return OK;
#endif
@@ -3183,7 +3241,7 @@ xtPublic void xt_dump_xlogs(XTDatabaseHP
* D A T A B A S E R E C O V E R Y T H R E A D
*/
-extern XTDatabaseHPtr pbxt_database;
+
static XTThreadPtr xres_recovery_thread;
static void *xn_xres_run_recovery_thread(XTThreadPtr self)
@@ -3193,18 +3251,18 @@ static void *xn_xres_run_recovery_thread
if (!(mysql_thread = (THD *) myxt_create_thread()))
xt_throw(self);
- while (!xres_recovery_thread->t_quit && !ha_resolve_by_legacy_type(mysql_thread, DB_TYPE_PBXT))
- xt_sleep_milli_second(1);
+ myxt_wait_pbxt_plugin_slot_assigned(self);
if (!xres_recovery_thread->t_quit) {
- /* {GLOBAL-DB}
- * It can happen that something will just get in before this
- * thread and open/recover the database!
- */
- if (!pbxt_database) {
- try_(a) {
+ try_(a) {
+ /* {GLOBAL-DB}
+ * It can happen that something will just get in before this
+ * thread and open/recover the database!
+ */
+ if (!pbxt_database) {
xt_open_database(self, mysql_real_data_home, TRUE);
- /* This can be done at the same time by a foreground thread,
+ /* {GLOBAL-DB}
+ * This can be done at the same time as the recovery thread,
* strictly speaking I need a lock.
*/
if (!pbxt_database) {
@@ -3212,11 +3270,22 @@ static void *xn_xres_run_recovery_thread
xt_heap_reference(self, pbxt_database);
}
}
- catch_(a) {
- xt_log_and_clear_exception(self);
- }
- cont_(a);
+ else
+ xt_use_database(self, pbxt_database, XT_FOR_USER);
+
+ pbxt_recovery_state = XT_RECOVER_DONE;
+
+ /* {WAIT-FOR-SW-AFTER-RECOV}
+ * Moved to here...
+ */
+ xt_wait_for_sweeper(self, self->st_database, 0);
+
+ pbxt_recovery_state = XT_RECOVER_SWEPT;
}
+ catch_(a) {
+ xt_log_and_clear_exception(self);
+ }
+ cont_(a);
}
/*
@@ -3261,11 +3330,12 @@ xtPublic void xt_xres_start_database_rec
sprintf(name, "DB-RECOVERY-%s", xt_last_directory_of_path(mysql_real_data_home));
xt_remove_dir_char(name);
+ pbxt_recovery_state = XT_RECOVER_PENDING;
xres_recovery_thread = xt_create_daemon(self, name);
xt_run_thread(self, xres_recovery_thread, xn_xres_run_recovery_thread);
}
-xtPublic void xt_xres_wait_for_recovery(XTThreadPtr self)
+xtPublic void xt_xres_terminate_recovery(XTThreadPtr self)
{
XTThreadPtr thr_rec;
=== modified file 'storage/pbxt/src/restart_xt.h'
--- a/storage/pbxt/src/restart_xt.h 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/restart_xt.h 2009-11-24 10:55:06 +0000
@@ -37,6 +37,8 @@ struct XTOpenTable;
struct XTDatabase;
struct XTTable;
+extern int pbxt_recovery_state;
+
typedef struct XTWriterState {
struct XTDatabase *ws_db;
xtBool ws_in_recover;
@@ -132,6 +134,16 @@ void xt_print_log_record(xtLogID log, of
void xt_dump_xlogs(struct XTDatabase *db, xtLogID start_log);
void xt_xres_start_database_recovery(XTThreadPtr self);
-void xt_xres_wait_for_recovery(XTThreadPtr self);
+void xt_xres_terminate_recovery(XTThreadPtr self);
+
+#define XT_RECOVER_PENDING 0
+#define XT_RECOVER_DONE 1
+#define XT_RECOVER_SWEPT 2
+
+inline void xt_xres_wait_for_recovery(XTThreadPtr XT_UNUSED(self), int state)
+{
+ while (pbxt_recovery_state < state)
+ xt_sleep_milli_second(100);
+}
#endif
=== modified file 'storage/pbxt/src/strutil_xt.cc'
--- a/storage/pbxt/src/strutil_xt.cc 2009-10-26 11:35:42 +0000
+++ b/storage/pbxt/src/strutil_xt.cc 2009-11-24 10:55:06 +0000
@@ -21,8 +21,10 @@
* H&G2JCtL
*/
-#include "mysql_priv.h"
#include "xt_config.h"
+
+#include <stdio.h>
+#include <string.h>
#include <ctype.h>
#include "strutil_xt.h"
@@ -107,13 +109,17 @@ xtPublic void xt_2nd_last_name_of_path(s
*dest = 0;
return;
}
- /* If temporary file */
- if (!is_prefix(path, mysql_data_home) &&
+
+ /* {INVALID-OLD-TABLE-FIX}
+ * I have changed the implementation of
+ * this bug fix (see {INVALID-OLD-TABLE-FIX}).
+ if (!is_prefix(path, mysql_data_home) &&
!is_prefix(path, mysql_real_data_home))
{
*dest= 0;
return;
}
+ */
ptr = path + len - 1;
while (ptr != path && !XT_IS_DIR_CHAR(*ptr))
@@ -374,7 +380,7 @@ xtPublic void xt_int8_to_byte_size(xtInt
/* Version number must also be set in configure.in! */
xtPublic c_char *xt_get_version(void)
{
- return "1.0.08d RC";
+ return "1.0.09f RC";
}
/* Copy and URL decode! */
=== modified file 'storage/pbxt/src/systab_xt.cc'
--- a/storage/pbxt/src/systab_xt.cc 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/systab_xt.cc 2009-11-24 10:55:06 +0000
@@ -130,7 +130,7 @@ static int pbms_discover_handler(handler
* MYSQL UTILITIES
*/
-void xt_my_set_notnull_in_record(Field *field, char *record)
+static void xt_my_set_notnull_in_record(Field *field, char *record)
{
if (field->null_ptr)
record[(uint) (field->null_ptr - (uchar *) field->table->record[0])] &= (uchar) ~field->null_bit;
@@ -518,7 +518,7 @@ bool XTStatisticsTable::seqScanRead(xtWo
* SYSTEM TABLE SHARES
*/
-void st_path_to_table_name(size_t size, char *buffer, const char *path)
+static void st_path_to_table_name(size_t size, char *buffer, const char *path)
{
char *str;
=== modified file 'storage/pbxt/src/tabcache_xt.cc'
--- a/storage/pbxt/src/tabcache_xt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/tabcache_xt.cc 2009-11-27 15:37:02 +0000
@@ -590,7 +590,7 @@ xtBool XTTabCache::tc_fetch(XT_ROW_REC_F
* So there could be a deadlock if I don't flush the log!
*/
if ((self = xt_get_self())) {
- if (!xt_xlog_flush_log(self))
+ if (!xt_xlog_flush_log(tci_table->tab_db, self))
goto failed;
}
@@ -1150,6 +1150,8 @@ static void *tabc_fr_run_thread(XTThread
int count;
void *mysql_thread;
+ myxt_wait_pbxt_plugin_slot_assigned(self);
+
mysql_thread = myxt_create_thread();
while (!self->t_quit) {
=== modified file 'storage/pbxt/src/tabcache_xt.h'
--- a/storage/pbxt/src/tabcache_xt.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/tabcache_xt.h 2009-11-24 10:55:06 +0000
@@ -168,7 +168,7 @@ typedef struct XTTableSeq {
#define TAB_CAC_UNLOCK(i, o) xt_xsmutex_unlock(i, o)
#elif defined(TAB_CAC_USE_PTHREAD_RW)
#define TAB_CAC_LOCK_TYPE xt_rwlock_type
-#define TAB_CAC_INIT_LOCK(s, i) xt_init_rwlock(s, i)
+#define TAB_CAC_INIT_LOCK(s, i) xt_init_rwlock_with_autoname(s, i)
#define TAB_CAC_FREE_LOCK(s, i) xt_free_rwlock(i)
#define TAB_CAC_READ_LOCK(i, o) xt_slock_rwlock_ns(i)
#define TAB_CAC_WRITE_LOCK(i, o) xt_xlock_rwlock_ns(i)
=== modified file 'storage/pbxt/src/table_xt.cc'
--- a/storage/pbxt/src/table_xt.cc 2009-08-18 07:46:53 +0000
+++ b/storage/pbxt/src/table_xt.cc 2009-11-25 15:40:51 +0000
@@ -35,7 +35,6 @@
#include <drizzled/common.h>
#include <mysys/thr_lock.h>
#include <drizzled/dtcollation.h>
-#include <drizzled/plugin/storage_engine.h>
#else
#include "mysql_priv.h"
#endif
@@ -48,7 +47,6 @@
#include "cache_xt.h"
#include "trace_xt.h"
#include "index_xt.h"
-#include "restart_xt.h"
#include "systab_xt.h"
#ifdef DEBUG
@@ -2347,7 +2345,7 @@ xtPublic void xt_flush_table(XTThreadPtr
}
-xtPublic XTOpenTablePtr tab_open_table(XTTableHPtr tab)
+static XTOpenTablePtr tab_open_table(XTTableHPtr tab)
{
volatile XTOpenTablePtr ot;
XTThreadPtr self;
@@ -2588,7 +2586,7 @@ xtPublic xtBool xt_tab_put_log_op_rec_da
return FAILED;
}
- return xt_xlog_modify_table(ot, status, op_seq, free_rec_id, rec_id, size, buffer);
+ return xt_xlog_modify_table(tab->tab_id, status, op_seq, free_rec_id, rec_id, size, buffer, ot->ot_thread);
}
xtPublic xtBool xt_tab_put_log_rec_data(XTOpenTablePtr ot, u_int status, xtRecordID free_rec_id, xtRecordID rec_id, size_t size, xtWord1 *buffer, xtOpSeqNo *op_seq)
@@ -2606,7 +2604,7 @@ xtPublic xtBool xt_tab_put_log_rec_data(
return FAILED;
}
- return xt_xlog_modify_table(ot, status, *op_seq, free_rec_id, rec_id, size, buffer);
+ return xt_xlog_modify_table(tab->tab_id, status, *op_seq, free_rec_id, rec_id, size, buffer, ot->ot_thread);
}
xtPublic xtBool xt_tab_get_rec_data(XTOpenTablePtr ot, xtRecordID rec_id, size_t size, xtWord1 *buffer)
@@ -3541,7 +3539,7 @@ xtPublic xtBool xt_tab_free_row(XTOpenTa
tab->tab_row_fnum++;
xt_unlock_mutex_ns(&tab->tab_row_lock);
- if (!xt_xlog_modify_table(ot, XT_LOG_ENT_ROW_FREED, op_seq, 0, row_id, sizeof(XTTabRowRefDRec), (xtWord1 *) &free_row))
+ if (!xt_xlog_modify_table(tab->tab_id, XT_LOG_ENT_ROW_FREED, op_seq, 0, row_id, sizeof(XTTabRowRefDRec), (xtWord1 *) &free_row, ot->ot_thread))
return FAILED;
return OK;
@@ -3791,7 +3789,7 @@ xtPublic int xt_tab_remove_record(XTOpen
xt_unlock_mutex_ns(&tab->tab_rec_lock);
free_rec->rf_rec_type_1 = old_rec_type;
- return xt_xlog_modify_table(ot, XT_LOG_ENT_REC_REMOVED_BI, op_seq, (xtRecordID) new_rec_type, rec_id, rec_size, ot->ot_row_rbuffer);
+ return xt_xlog_modify_table(tab->tab_id, XT_LOG_ENT_REC_REMOVED_BI, op_seq, (xtRecordID) new_rec_type, rec_id, rec_size, ot->ot_row_rbuffer, ot->ot_thread);
}
static xtRowID tab_new_row(XTOpenTablePtr ot, XTTableHPtr tab)
@@ -3837,7 +3835,7 @@ static xtRowID tab_new_row(XTOpenTablePt
op_seq = tab->tab_seq.ts_get_op_seq();
xt_unlock_mutex_ns(&tab->tab_row_lock);
- if (!xt_xlog_modify_table(ot, status, op_seq, next_row_id, row_id, 0, NULL))
+ if (!xt_xlog_modify_table(tab->tab_id, status, op_seq, next_row_id, row_id, 0, NULL, ot->ot_thread))
return 0;
XT_DISABLED_TRACE(("new row tx=%d row=%d\n", (int) ot->ot_thread->st_xact_data->xd_start_xn_id, (int) row_id));
@@ -3868,7 +3866,7 @@ xtPublic xtBool xt_tab_set_row(XTOpenTab
if (!tab->tab_rows.xt_tc_write(ot->ot_row_file, row_id, 0, sizeof(XTTabRowRefDRec), (xtWord1 *) &row_buf, &op_seq, TRUE, ot->ot_thread))
return FAILED;
- return xt_xlog_modify_table(ot, status, op_seq, 0, row_id, sizeof(XTTabRowRefDRec), (xtWord1 *) &row_buf);
+ return xt_xlog_modify_table(tab->tab_id, status, op_seq, 0, row_id, sizeof(XTTabRowRefDRec), (xtWord1 *) &row_buf, ot->ot_thread);
}
xtPublic xtBool xt_tab_free_record(XTOpenTablePtr ot, u_int status, xtRecordID rec_id, xtBool clean_delete)
@@ -3937,7 +3935,7 @@ xtPublic xtBool xt_tab_free_record(XTOpe
tab->tab_rec_fnum++;
xt_unlock_mutex_ns(&tab->tab_rec_lock);
- if (!xt_xlog_modify_table(ot, status, op_seq, rec_id, rec_id, sizeof(XTactFreeRecEntryDRec) - offsetof(XTactFreeRecEntryDRec, fr_stat_id_1), &free_rec.fr_stat_id_1))
+ if (!xt_xlog_modify_table(tab->tab_id, status, op_seq, rec_id, rec_id, sizeof(XTactFreeRecEntryDRec) - offsetof(XTactFreeRecEntryDRec, fr_stat_id_1), &free_rec.fr_stat_id_1, ot->ot_thread))
return FAILED;
}
return OK;
@@ -4016,7 +4014,7 @@ static xtBool tab_add_record(XTOpenTable
}
xt_unlock_mutex_ns(&tab->tab_rec_lock);
- if (!xt_xlog_modify_table(ot, status, op_seq, next_rec_id, rec_id, rec_info->ri_rec_buf_size, (xtWord1 *) rec_info->ri_fix_rec_buf))
+ if (!xt_xlog_modify_table(tab->tab_id, status, op_seq, next_rec_id, rec_id, rec_info->ri_rec_buf_size, (xtWord1 *) rec_info->ri_fix_rec_buf, ot->ot_thread))
return FAILED;
if (rec_info->ri_ext_rec) {
@@ -4932,6 +4930,12 @@ xtPublic void xt_tab_seq_exit(XTOpenTabl
#endif
#endif
+xtPublic void xt_tab_seq_repeat(XTOpenTablePtr ot)
+{
+ ot->ot_seq_rec_id--;
+ ot->ot_seq_offset -= ot->ot_table->tab_dic.dic_rec_size;
+}
+
xtPublic xtBool xt_tab_seq_next(XTOpenTablePtr ot, xtWord1 *buffer, xtBool *eof)
{
register XTTableHPtr tab = ot->ot_table;
@@ -5094,7 +5098,7 @@ static xtBool tab_exec_repair_pending(XT
return FALSE;
}
else {
- if (!xt_open_file_ns(&of, file_path, XT_FS_DEFAULT))
+ if (!xt_open_file_ns(&of, file_path, XT_FS_DEFAULT | XT_FS_MISSING_OK))
return FALSE;
}
if (!of)
@@ -5190,15 +5194,76 @@ static xtBool tab_exec_repair_pending(XT
return FALSE;
}
-xtPublic void tab_make_table_name(XTTableHPtr tab, char *table_name, size_t size)
+static void tab_make_table_name(XTTableHPtr tab, char *table_name, size_t size)
{
- char name_buf[XT_IDENTIFIER_NAME_SIZE*3+3];
+ char *nptr;
- xt_2nd_last_name_of_path(sizeof(name_buf), name_buf, tab->tab_name->ps_path);
- myxt_static_convert_file_name(name_buf, table_name, size);
- xt_strcat(size, table_name, ".");
- myxt_static_convert_file_name(xt_last_name_of_path(tab->tab_name->ps_path), name_buf, sizeof(name_buf));
- xt_strcat(size, table_name, name_buf);
+ nptr = xt_last_name_of_path(tab->tab_name->ps_path);
+ if (xt_starts_with(nptr, "#sql")) {
+ /* {INVALID-OLD-TABLE-FIX}
+ * Temporary files can have strange paths, for example
+ * ..../var/tmp/mysqld.1/#sqldaec_1_6
+ * This occurs, for example, occurs when the temp_table.test is
+ * run using the PBXT suite in MariaDB:
+ * ./mtr --suite=pbxt --do-test=temp_table
+ *
+ * Calling myxt_static_convert_file_name, with a '.', in the name
+ * causes the error:
+ * [ERROR] Invalid (old?) table or database name 'mysqld.1'
+ * To prevent this, we do not convert the temporary
+ * table names using the mysql functions.
+ *
+ * Note, this bug was found by Monty, and fixed by modifying
+ * xt_2nd_last_name_of_path(), see {INVALID-OLD-TABLE-FIX}.
+ *
+ */
+ xt_2nd_last_name_of_path(size, table_name, tab->tab_name->ps_path);
+ xt_strcat(size, table_name, ".");
+ xt_strcat(size, table_name, nptr);
+ }
+ else {
+ char name_buf[XT_TABLE_NAME_SIZE*3+3];
+ char *part_ptr;
+ size_t len;
+
+ xt_2nd_last_name_of_path(sizeof(name_buf), name_buf, tab->tab_name->ps_path);
+ myxt_static_convert_file_name(name_buf, table_name, size);
+ xt_strcat(size, table_name, ".");
+
+ /* Handle partition extensions to table names: */
+ if ((part_ptr = strstr(nptr, "#P#")))
+ xt_strncpy(sizeof(name_buf), name_buf, nptr, part_ptr - nptr);
+ else
+ xt_strcpy(sizeof(name_buf), name_buf, nptr);
+
+ len = strlen(table_name);
+ myxt_static_convert_file_name(name_buf, table_name + len, size - len);
+
+ if (part_ptr) {
+ /* Add the partition extension (which is relevant to the engine). */
+ char *sub_part_ptr;
+
+ part_ptr += 3;
+ if ((sub_part_ptr = strstr(part_ptr, "#SP#")))
+ xt_strncpy(sizeof(name_buf), name_buf, part_ptr, sub_part_ptr - part_ptr);
+ else
+ xt_strcpy(sizeof(name_buf), name_buf, part_ptr);
+
+ xt_strcat(size, table_name, " (");
+ len = strlen(table_name);
+ myxt_static_convert_file_name(name_buf, table_name + len, size - len);
+
+ if (sub_part_ptr) {
+
+ sub_part_ptr += 4;
+ xt_strcat(size, table_name, " - ");
+ len = strlen(table_name);
+ myxt_static_convert_file_name(sub_part_ptr, table_name + len, size - len);
+ }
+
+ xt_strcat(size, table_name, ")");
+ }
+ }
}
xtPublic xtBool xt_tab_is_table_repair_pending(XTTableHPtr tab)
=== modified file 'storage/pbxt/src/table_xt.h'
--- a/storage/pbxt/src/table_xt.h 2009-08-18 07:46:53 +0000
+++ b/storage/pbxt/src/table_xt.h 2009-11-24 10:55:06 +0000
@@ -127,7 +127,7 @@ struct XTTablePath;
#define XT_TAB_ROW_UNLOCK(i, s) xt_xsmutex_unlock(i, (s)->t_id)
#elif defined(XT_TAB_ROW_USE_PTHREAD_RW)
#define XT_TAB_ROW_LOCK_TYPE xt_rwlock_type
-#define XT_TAB_ROW_INIT_LOCK(s, i) xt_init_rwlock(s, i)
+#define XT_TAB_ROW_INIT_LOCK(s, i) xt_init_rwlock_with_autoname(s, i)
#define XT_TAB_ROW_FREE_LOCK(s, i) xt_free_rwlock(i)
#define XT_TAB_ROW_READ_LOCK(i, s) xt_slock_rwlock_ns(i)
#define XT_TAB_ROW_WRITE_LOCK(i, s) xt_xlock_rwlock_ns(i)
@@ -528,13 +528,14 @@ xtBool xt_table_exists(struct XTDatab
void xt_enum_tables_init(u_int *edx);
XTTableEntryPtr xt_enum_tables_next(struct XTThread *self, struct XTDatabase *db, u_int *edx);
-void xt_enum_files_of_tables_init(struct XTDatabase *db, char *tab_name, xtTableID tab_id, XTFilesOfTablePtr ft);
+void xt_enum_files_of_tables_init(XTPathStrPtr tab_name, xtTableID tab_id, XTFilesOfTablePtr ft);
xtBool xt_enum_files_of_tables_next(XTFilesOfTablePtr ft);
xtBool xt_tab_seq_init(XTOpenTablePtr ot);
void xt_tab_seq_reset(XTOpenTablePtr ot);
void xt_tab_seq_exit(XTOpenTablePtr ot);
xtBool xt_tab_seq_next(XTOpenTablePtr ot, xtWord1 *buffer, xtBool *eof);
+void xt_tab_seq_repeat(XTOpenTablePtr ot);
xtBool xt_tab_new_record(XTOpenTablePtr ot, xtWord1 *buffer);
xtBool xt_tab_delete_record(XTOpenTablePtr ot, xtWord1 *buffer);
=== modified file 'storage/pbxt/src/thread_xt.cc'
--- a/storage/pbxt/src/thread_xt.cc 2009-10-06 15:16:01 +0000
+++ b/storage/pbxt/src/thread_xt.cc 2009-11-24 10:55:06 +0000
@@ -75,6 +75,13 @@ static xt_mutex_type thr_array_lock;
/* Global accumulated statistics: */
static XTStatisticsRec thr_statistics;
+#ifdef DEBUG
+static void break_in_assertion(c_char *expr, c_char *func, c_char *file, u_int line)
+{
+ printf("%s(%s:%d) %s\n", func, file, (int) line, expr);
+}
+#endif
+
/*
* -----------------------------------------------------------------------
* Error logging
@@ -658,6 +665,9 @@ static c_char *thr_get_err_string(int xt
case XT_ERR_FK_REF_TEMP_TABLE: str = "Foreign key may not reference temporary table"; break;
case XT_ERR_MYSQL_SHUTDOWN: str = "Cannot open table, MySQL has shutdown"; break;
case XT_ERR_MYSQL_NO_THREAD: str = "Cannot create thread, MySQL has shutdown"; break;
+ case XT_ERR_BUFFER_TOO_SMALL: str = "System backup buffer too small"; break;
+ case XT_ERR_BAD_BACKUP_FORMAT: str = "Unknown or corrupt backup format, restore aborted"; break;
+ case XT_ERR_PBXT_NOT_INSTALLED: str = "PBXT plugin is not installed"; break;
default: str = "Unknown XT error"; break;
}
return str;
@@ -862,6 +872,11 @@ xtPublic xtBool xt_exception_errno(XTExc
return FAILED;
}
+xtPublic void xt_exception_xterr(XTExceptionPtr e, XTThreadPtr self, c_char *func, c_char *file, u_int line, int xt_err)
+{
+ xt_exception_error(e, self, func, file, line, xt_err, 0, thr_get_err_string(xt_err));
+}
+
/*
* -----------------------------------------------------------------------
* LOG ERRORS
@@ -887,7 +902,7 @@ xtPublic xtBool xt_assert(XTThreadPtr se
#ifdef DEBUG
//xt_set_fflush(TRUE);
//xt_dump_trace();
- printf("%s(%s:%d) %s\n", func, file, (int) line, expr);
+ break_in_assertion(expr, func, file, line);
#ifdef CRASH_ON_ASSERT
abort();
#endif
=== modified file 'storage/pbxt/src/thread_xt.h'
--- a/storage/pbxt/src/thread_xt.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/thread_xt.h 2009-11-24 10:55:06 +0000
@@ -536,6 +536,8 @@ extern struct XTThread **xt_thr_array;
* Function prototypes
*/
+extern "C" void *thr_main(void *data);
+
void xt_get_now(char *buffer, size_t len);
xtBool xt_init_logging(void);
void xt_exit_logging(void);
@@ -583,6 +585,7 @@ void xt_register_xterr(c_char *func, c
void xt_exceptionf(XTExceptionPtr e, XTThreadPtr self, c_char *func, c_char *file, u_int line, int xt_err, int sys_err, c_char *fmt, ...);
void xt_exception_error(XTExceptionPtr e, XTThreadPtr self, c_char *func, c_char *file, u_int line, int xt_err, int sys_err, c_char *msg);
xtBool xt_exception_errno(XTExceptionPtr e, XTThreadPtr self, c_char *func, c_char *file, u_int line, int err);
+void xt_exception_xterr(XTExceptionPtr e, XTThreadPtr self, c_char *func, c_char *file, u_int line, int xt_err);
void xt_log_errno(XTThreadPtr self, c_char *func, c_char *file, u_int line, int err);
@@ -610,7 +613,7 @@ void xt_critical_wait(void);
void xt_yield(void);
void xt_sleep_milli_second(u_int t);
xtBool xt_suspend(XTThreadPtr self);
-xtBool xt_unsuspend(XTThreadPtr self, XTThreadPtr target);
+xtBool xt_unsuspend(XTThreadPtr target);
void xt_lock_thread(XTThreadPtr thread);
void xt_unlock_thread(XTThreadPtr thread);
xtBool xt_wait_thread(XTThreadPtr thread);
=== modified file 'storage/pbxt/src/util_xt.cc'
--- a/storage/pbxt/src/util_xt.cc 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/util_xt.cc 2009-11-24 10:55:06 +0000
@@ -150,6 +150,23 @@ xtPublic xtWord1 xt_get_checksum1(xtWord
return (xtWord1) (sum ^ (sum >> 24) ^ (sum >> 16) ^ (sum >> 8));
}
+xtPublic xtWord4 xt_get_checksum4(xtWord1 *data, size_t len)
+{
+ register xtWord4 sum = 0, g;
+ xtWord1 *chk;
+
+ chk = data + len - 1;
+ while (chk > data) {
+ sum = (sum << 4) + *chk;
+ if ((g = sum & 0xF0000000)) {
+ sum = sum ^ (g >> 24);
+ sum = sum ^ g;
+ }
+ chk--;
+ }
+ return sum;
+}
+
/*
* --------------- Data Buffer ------------------
*/
=== modified file 'storage/pbxt/src/util_xt.h'
--- a/storage/pbxt/src/util_xt.h 2009-03-26 12:18:01 +0000
+++ b/storage/pbxt/src/util_xt.h 2009-11-24 10:55:06 +0000
@@ -39,6 +39,7 @@ xtWord4 xt_file_name_to_id(char *file_na
xtBool xt_time_difference(register xtWord4 now, register xtWord4 then);
xtWord2 xt_get_checksum(xtWord1 *data, size_t len, u_int interval);
xtWord1 xt_get_checksum1(xtWord1 *data, size_t len);
+xtWord4 xt_get_checksum4(xtWord1 *data, size_t len);
typedef struct XTDataBuffer {
size_t db_size;
=== modified file 'storage/pbxt/src/xaction_xt.cc'
--- a/storage/pbxt/src/xaction_xt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/xaction_xt.cc 2009-11-24 10:55:06 +0000
@@ -1075,6 +1075,7 @@ xtPublic void xt_xn_init_db(XTThreadPtr
#endif
xt_spinlock_init_with_autoname(self, &db->db_xn_id_lock);
xt_spinlock_init_with_autoname(self, &db->db_xn_wait_spinlock);
+ xt_init_mutex_with_autoname(self, &db->db_xn_xa_lock);
//xt_init_mutex_with_autoname(self, &db->db_xn_wait_lock);
//xt_init_cond(self, &db->db_xn_wait_cond);
xt_init_mutex_with_autoname(self, &db->db_sw_lock);
@@ -1096,6 +1097,9 @@ xtPublic void xt_xn_init_db(XTThreadPtr
}
}
+ /* Create a sorted list for XA transactions recovered: */
+ db->db_xn_xa_list = xt_new_sortedlist(self, sizeof(XTXactXARec), 100, 50, xt_xn_xa_compare, db, NULL, FALSE, FALSE);
+
/* Initialize the data logs: */
db->db_datalogs.dlc_init(self, db);
@@ -1146,6 +1150,7 @@ xtPublic void xt_xn_exit_db(XTThreadPtr
printf("=========> MAX TXs NOT CLEAN: %lu\n", not_clean_max);
printf("=========> MAX TXs IN RAM: %lu\n", in_ram_max);
#endif
+ XTXactPreparePtr xap, xap_next;
xt_stop_sweeper(self, db); // Should be done already!
xt_stop_writer(self, db); // Should be done already!
@@ -1187,6 +1192,19 @@ xtPublic void xt_xn_exit_db(XTThreadPtr
xt_free_mutex(&db->db_sw_lock);
//xt_free_cond(&db->db_xn_wait_cond);
//xt_free_mutex(&db->db_xn_wait_lock);
+ xt_free_mutex(&db->db_xn_xa_lock);
+ for (u_int i=0; i<XT_XA_HASH_TAB_SIZE; i++) {
+ xap = db->db_xn_xa_table[i];
+ while (xap) {
+ xap_next = xap->xp_next;
+ xt_free(self, xap);
+ xap = xap_next;
+ }
+ }
+ if (db->db_xn_xa_list) {
+ xt_free_sortedlist(self, db->db_xn_xa_list);
+ db->db_xn_xa_list = NULL;
+ }
xt_spinlock_free(self, &db->db_xn_wait_spinlock);
xt_spinlock_free(self, &db->db_xn_id_lock);
#ifdef DEBUG_RAM_LIST
@@ -1428,7 +1446,7 @@ static xtBool xn_end_xact(XTThreadPtr th
wait_xn_id = thread->st_prev_xact[thread->st_last_xact];
thread->st_prev_xact[thread->st_last_xact] = xn_id;
/* This works because XT_MAX_XACT_BEHIND == 2! */
- ASSERT_NS((thread->st_last_xact + 1) % XT_MAX_XACT_BEHIND == thread->st_last_xact ^ 1);
+ ASSERT_NS((thread->st_last_xact + 1) % XT_MAX_XACT_BEHIND == (thread->st_last_xact ^ 1));
thread->st_last_xact ^= 1;
while (xt_xn_is_before(db->db_xn_to_clean_id, wait_xn_id) && (db->db_sw_faster & XT_SW_TOO_FAR_BEHIND)) {
xt_critical_wait();
@@ -1548,6 +1566,149 @@ xtPublic int xt_xn_status(XTOpenTablePtr
return XT_XN_ABORTED;
}
+/* ----------------------------------------------------------------------
+ * XA Functionality
+ */
+
+xtPublic int xt_xn_xa_compare(XTThreadPtr XT_UNUSED(self), register const void *XT_UNUSED(thunk), register const void *a, register const void *b)
+{
+ xtXactID *x = (xtXactID *) a;
+ XTXactXAPtr y = (XTXactXAPtr) b;
+
+ if (*x == y->xx_xact_id)
+ return 0;
+ if (xt_xn_is_before(*x, y->xx_xact_id))
+ return -1;
+ return 1;
+}
+
+xtPublic xtBool xt_xn_prepare(int len, xtWord1 *xa_data, XTThreadPtr thread)
+{
+ XTXactDataPtr xact;
+
+ ASSERT_NS(thread->st_xact_data);
+ if ((xact = thread->st_xact_data)) {
+ xtXactID xn_id = xact->xd_start_xn_id;
+
+ /* Only makes sense if the transaction has already been logged: */
+ if ((thread->st_xact_data->xd_flags & XT_XN_XAC_LOGGED)) {
+ if (!xt_xlog_modify_table(0, XT_LOG_ENT_PREPARE, xn_id, 0, 0, len, xa_data, thread))
+ return FAILED;
+ }
+ }
+ return OK;
+}
+
+xtPublic xtBool xt_xn_store_xa_data(XTDatabaseHPtr db, xtXactID xact_id, int len, xtWord1 *xa_data, XTThreadPtr XT_UNUSED(thread))
+{
+ XTXactPreparePtr xap;
+ u_int idx;
+ XTXactXARec xx;
+
+ if (!(xap = (XTXactPreparePtr) xt_malloc_ns(offsetof(XTXactPrepareRec, xp_xa_data) + len)))
+ return FAILED;
+ xap->xp_xact_id = xact_id;
+ xap->xp_hash = xt_get_checksum4(xa_data, len);
+ xap->xp_data_len = len;
+ memcpy(xap->xp_xa_data, xa_data, len);
+ xx.xx_xact_id = xact_id;
+ xx.xx_xa_ptr = xap;
+
+ idx = xap->xp_hash % XT_XA_HASH_TAB_SIZE;
+ xt_lock_mutex_ns(&db->db_xn_xa_lock);
+ if (!xt_sl_insert(NULL, db->db_xn_xa_list, &xact_id, &xx)) {
+ xt_unlock_mutex_ns(&db->db_xn_xa_lock);
+ xt_free_ns(xap);
+ }
+ xap->xp_next = db->db_xn_xa_table[idx];
+ db->db_xn_xa_table[idx] = xap;
+ xt_unlock_mutex_ns(&db->db_xn_xa_lock);
+ return OK;
+}
+
+xtPublic void xt_xn_delete_xa_data_by_xact(XTDatabaseHPtr db, xtXactID xact_id, XTThreadPtr thread)
+{
+ XTXactXAPtr xx;
+
+ xt_lock_mutex_ns(&db->db_xn_xa_lock);
+ if (!(xx = (XTXactXAPtr) xt_sl_find(NULL, db->db_xn_xa_list, &xact_id)))
+ return;
+ xt_xn_delete_xa_data(db, xx->xx_xa_ptr, TRUE, thread);
+}
+
+xtPublic void xt_xn_delete_xa_data(XTDatabaseHPtr db, XTXactPreparePtr xap, xtBool unlock, XTThreadPtr XT_UNUSED(thread))
+{
+ u_int idx;
+ XTXactPreparePtr xap_ptr, xap_pptr = NULL;
+
+ xt_sl_delete(NULL, db->db_xn_xa_list, &xap->xp_xact_id);
+ idx = xap->xp_hash % XT_XA_HASH_TAB_SIZE;
+ xap_ptr = db->db_xn_xa_table[idx];
+ while (xap_ptr) {
+ if (xap_ptr == xap)
+ break;
+ xap_pptr = xap_ptr;
+ xap_ptr = xap_ptr->xp_next;
+ }
+ if (xap_ptr) {
+ if (xap_pptr)
+ xap_pptr->xp_next = xap_ptr->xp_next;
+ else
+ db->db_xn_xa_table[idx] = xap_ptr->xp_next;
+ xt_free_ns(xap);
+ }
+ if (unlock)
+ xt_unlock_mutex_ns(&db->db_xn_xa_lock);
+}
+
+xtPublic XTXactPreparePtr xt_xn_find_xa_data(XTDatabaseHPtr db, int len, xtWord1 *xa_data, xtBool lock, XTThreadPtr XT_UNUSED(thread))
+{
+ xtWord4 hash;
+ XTXactPreparePtr xap;
+ u_int idx;
+
+ if (lock)
+ xt_lock_mutex_ns(&db->db_xn_xa_lock);
+ hash = xt_get_checksum4(xa_data, len);
+ idx = hash % XT_XA_HASH_TAB_SIZE;
+ xap = db->db_xn_xa_table[idx];
+ while (xap) {
+ if (xap->xp_hash == hash &&
+ xap->xp_data_len == len &&
+ memcmp(xap->xp_xa_data, xa_data, len) == 0) {
+ break;
+ }
+ xap = xap->xp_next;
+ }
+
+ return xap;
+}
+
+xtPublic XTXactPreparePtr xt_xn_enum_xa_data(XTDatabaseHPtr db, XTXactEnumXAPtr exa)
+{
+ XTXactXAPtr xx;
+
+ if (!exa->exa_locked) {
+ xt_lock_mutex_ns(&db->db_xn_xa_lock);
+ exa->exa_locked = TRUE;
+ }
+
+ if ((xx = (XTXactXAPtr) xt_sl_item_at(db->db_xn_xa_list, exa->exa_index))) {
+ exa->exa_index++;
+ return xx->xx_xa_ptr;
+ }
+
+ if (exa->exa_locked) {
+ exa->exa_locked = FALSE;
+ xt_unlock_mutex_ns(&db->db_xn_xa_lock);
+ }
+ return NULL;
+}
+
+/* ----------------------------------------------------------------------
+ * S W E E P E R F U N C T I O N S
+ */
+
xtPublic xtWord8 xt_xn_bytes_to_sweep(XTDatabaseHPtr db, XTThreadPtr thread)
{
xtXactID xn_id;
@@ -2047,7 +2208,7 @@ static xtBool xn_sw_cleanup_variation(XT
if(!tab->tab_recs.xt_tc_write_cond(self, ot->ot_rec_file, rec_id, rec_head.tr_rec_type_1, &op_seq, xn_id, row_id, stat_id, rec_type))
/* this means record was not updated by xt_tc_write_bor and doesn't need to */
break;
- if (!xt_xlog_modify_table(ot, XT_LOG_ENT_REC_CLEANED_1, op_seq, 0, rec_id, 1, &rec_head.tr_rec_type_1))
+ if (!xt_xlog_modify_table(tab->tab_id, XT_LOG_ENT_REC_CLEANED_1, op_seq, 0, rec_id, 1, &rec_head.tr_rec_type_1, self))
throw_();
xn_sw_clean_indices(self, ot, rec_id, row_id, rec_buf, ss->ss_databuf.db_data);
break;
@@ -2397,8 +2558,10 @@ static void xn_sw_main(XTThreadPtr self)
if ((xact = xt_xn_get_xact(db, db->db_xn_to_clean_id, self))) {
xtXactID xn_id;
- if (!(xact->xd_flags & XT_XN_XAC_SWEEP))
- /* Transaction has not yet ending, and ready to sweep. */
+ /* The sweep flag is set when the transaction is ready for sweeping.
+ * Prepared transactions may not be swept!
+ */
+ if (!(xact->xd_flags & XT_XN_XAC_SWEEP) || (xact->xd_flags & XT_XN_XAC_PREPARED))
goto sleep;
/* Check if we can cleanup the transaction.
@@ -2493,7 +2656,7 @@ static void xn_sw_main(XTThreadPtr self)
* we flush the log.
*/
if (now >= idle_start + 2) {
- if (!xt_xlog_flush_log(self))
+ if (!xt_xlog_flush_log(db, self))
xt_throw(self);
ss->ss_flush_pending = FALSE;
}
@@ -2516,7 +2679,7 @@ static void xn_sw_main(XTThreadPtr self)
}
if (ss->ss_flush_pending) {
- xt_xlog_flush_log(self);
+ xt_xlog_flush_log(db, self);
ss->ss_flush_pending = FALSE;
}
=== modified file 'storage/pbxt/src/xaction_xt.h'
--- a/storage/pbxt/src/xaction_xt.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/xaction_xt.h 2009-11-24 10:55:06 +0000
@@ -87,6 +87,7 @@ struct XTOpenTable;
#define XT_XN_XAC_CLEANED 8 /* The transaction has been cleaned. */
#define XT_XN_XAC_RECOVERED 16 /* This transaction was detected on recovery. */
#define XT_XN_XAC_SWEEP 32 /* End ID has been set, OK to sweep. */
+#define XT_XN_XAC_PREPARED 64 /* The transaction was prepared (used only by recovery). */
#define XT_XN_VISIBLE 0 /* The transaction is committed, and the record is visible. */
#define XT_XN_NOT_VISIBLE 1 /* The transaction is committed, but not visible. */
@@ -95,6 +96,24 @@ struct XTOpenTable;
#define XT_XN_OTHER_UPDATE 4 /* The record was updated by someone else. */
#define XT_XN_REREAD 5 /* The transaction is not longer in RAM, status is unkown, retry. */
+typedef struct XTXactPrepare {
+ xtXactID xp_xact_id;
+ xtWord4 xp_hash;
+ struct XTXactPrepare *xp_next; /* Next item in hash table. */
+ int xp_data_len;
+ xtWord1 xp_xa_data[XT_MAX_XA_DATA_SIZE];
+} XTXactPrepareRec, *XTXactPreparePtr;
+
+typedef struct XTXactXA {
+ xtXactID xx_xact_id;
+ XTXactPreparePtr xx_xa_ptr;
+} XTXactXARec, *XTXactXAPtr;
+
+typedef struct XTXactEnumXA {
+ u_int exa_index;
+ xtBool exa_locked;
+} XTXactEnumXARec, *XTXactEnumXAPtr;
+
typedef struct XTXactData {
xtXactID xd_start_xn_id; /* Note: may be zero!. */
xtXactID xd_end_xn_id; /* Note: may be zero!. */
@@ -105,6 +124,7 @@ typedef struct XTXactData {
int xd_flags;
xtWord4 xd_end_time;
xtThreadID xd_thread_id;
+ xtWord4 xd_xa_hash; /* 0 if no XA transaction. */
/* A transaction may be indexed twice in the hash table.
* Once on the start sequence number, and once on the
@@ -123,7 +143,7 @@ typedef struct XTXactData {
#if defined(XT_XACT_USE_PTHREAD_RW)
#define XT_XACT_LOCK_TYPE xt_rwlock_type
-#define XT_XACT_INIT_LOCK(s, i) xt_init_rwlock(s, i)
+#define XT_XACT_INIT_LOCK(s, i) xt_init_rwlock_with_autoname(s, i)
#define XT_XACT_FREE_LOCK(s, i) xt_free_rwlock(i)
#define XT_XACT_READ_LOCK(i, s) xt_slock_rwlock_ns(i)
#define XT_XACT_WRITE_LOCK(i, s) xt_xlock_rwlock_ns(i)
@@ -183,6 +203,14 @@ void xt_xn_wakeup_thread(xtThreadID th
xtXactID xt_xn_get_curr_id(struct XTDatabase *db);
xtWord8 xt_xn_bytes_to_sweep(struct XTDatabase *db, struct XTThread *thread);
+int xt_xn_xa_compare(struct XTThread *self, register const void *thunk, register const void *a, register const void *b);
+xtBool xt_xn_prepare(int len, xtWord1 *xa_data, struct XTThread *thread);
+xtBool xt_xn_store_xa_data(struct XTDatabase *db, xtXactID xn_id, int len, xtWord1 *xa_data, struct XTThread *thread);
+void xt_xn_delete_xa_data_by_xact(struct XTDatabase *db, xtXactID xact_id, struct XTThread *thread);
+void xt_xn_delete_xa_data(struct XTDatabase *db, XTXactPreparePtr xap, xtBool unlock, struct XTThread *thread);
+XTXactPreparePtr xt_xn_find_xa_data(struct XTDatabase *db, int len, xtWord1 *xa_data, xtBool lock, struct XTThread *thread);
+XTXactPreparePtr xt_xn_enum_xa_data(struct XTDatabase *db, XTXactEnumXAPtr exa);
+
XTXactDataPtr xt_xn_add_old_xact(struct XTDatabase *db, xtXactID xn_id, struct XTThread *thread);
XTXactDataPtr xt_xn_get_xact(struct XTDatabase *db, xtXactID xn_id, struct XTThread *thread);
xtBool xt_xn_delete_xact(struct XTDatabase *db, xtXactID xn_id, struct XTThread *thread);
=== modified file 'storage/pbxt/src/xactlog_xt.cc'
--- a/storage/pbxt/src/xactlog_xt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/xactlog_xt.cc 2009-11-24 10:55:06 +0000
@@ -1108,6 +1108,9 @@ xtBool XTDatabaseLog::xlog_append(XTThre
if ((part_size = xl_write_buf_pos % 512)) {
part_size = 512 - part_size;
xl_write_buffer[xl_write_buf_pos] = XT_LOG_ENT_END_OF_LOG;
+#ifdef HAVE_valgrind
+ memset(xl_write_buffer + xl_write_buf_pos + 1, 0x66, part_size);
+#endif
if (!xt_pwrite_file(xl_log_file, xl_write_log_offset, xl_write_buf_pos+part_size, xl_write_buffer, &thread->st_statistics.st_xlog, thread))
goto write_failed;
}
@@ -1477,9 +1480,9 @@ void XTDatabaseLog::xlog_name(size_t siz
* T H R E A D T R A N S A C T I O N B U F F E R
*/
-xtPublic xtBool xt_xlog_flush_log(XTThreadPtr thread)
+xtPublic xtBool xt_xlog_flush_log(struct XTDatabase *db, XTThreadPtr thread)
{
- return thread->st_database->db_xlog.xlog_flush(thread);
+ return db->db_xlog.xlog_flush(thread);
}
xtPublic xtBool xt_xlog_log_data(XTThreadPtr thread, size_t size, XTXactLogBufferDPtr log_entry, xtBool commit)
@@ -1488,15 +1491,14 @@ xtPublic xtBool xt_xlog_log_data(XTThrea
}
/* Allocate a record from the free list. */
-xtPublic xtBool xt_xlog_modify_table(struct XTOpenTable *ot, u_int status, xtOpSeqNo op_seq, xtRecordID free_rec_id, xtRecordID rec_id, size_t size, xtWord1 *data)
+xtPublic xtBool xt_xlog_modify_table(xtTableID tab_id, u_int status, xtOpSeqNo op_seq, xtRecordID free_rec_id, xtRecordID rec_id, size_t size, xtWord1 *data, XTThreadPtr thread)
{
XTXactLogBufferDRec log_entry;
- XTThreadPtr thread = ot->ot_thread;
- XTTableHPtr tab = ot->ot_table;
size_t len;
xtWord4 sum = 0;
int check_size = 1;
XTXactDataPtr xact = NULL;
+ xtBool commit = FALSE;
switch (status) {
case XT_LOG_ENT_REC_MODIFIED:
@@ -1505,7 +1507,7 @@ xtPublic xtBool xt_xlog_modify_table(str
case XT_LOG_ENT_DELETE:
check_size = 2;
XT_SET_DISK_4(log_entry.xu.xu_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.xu.xu_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.xu.xu_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.xu.xu_rec_id_4, rec_id);
XT_SET_DISK_2(log_entry.xu.xu_size_2, size);
len = offsetof(XTactUpdateEntryDRec, xu_rec_type_1);
@@ -1521,7 +1523,7 @@ xtPublic xtBool xt_xlog_modify_table(str
case XT_LOG_ENT_DELETE_FL:
check_size = 2;
XT_SET_DISK_4(log_entry.xf.xf_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.xf.xf_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.xf.xf_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.xf.xf_rec_id_4, rec_id);
XT_SET_DISK_2(log_entry.xf.xf_size_2, size);
XT_SET_DISK_4(log_entry.xf.xf_free_rec_id_4, free_rec_id);
@@ -1539,14 +1541,14 @@ xtPublic xtBool xt_xlog_modify_table(str
case XT_LOG_ENT_REC_REMOVED_EXT:
ASSERT_NS(size == 1 + XT_XACT_ID_SIZE + sizeof(XTTabRecFreeDRec));
XT_SET_DISK_4(log_entry.fr.fr_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.fr.fr_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.fr.fr_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.fr.fr_rec_id_4, rec_id);
len = offsetof(XTactFreeRecEntryDRec, fr_stat_id_1);
break;
case XT_LOG_ENT_REC_REMOVED_BI:
check_size = 2;
XT_SET_DISK_4(log_entry.rb.rb_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.rb.rb_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.rb.rb_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.rb.rb_rec_id_4, rec_id);
XT_SET_DISK_2(log_entry.rb.rb_size_2, size);
log_entry.rb.rb_new_rec_type_1 = (xtWord1) free_rec_id;
@@ -1556,42 +1558,42 @@ xtPublic xtBool xt_xlog_modify_table(str
case XT_LOG_ENT_REC_MOVED:
ASSERT_NS(size == 8);
XT_SET_DISK_4(log_entry.xw.xw_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.xw.xw_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.xw.xw_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.xw.xw_rec_id_4, rec_id);
len = offsetof(XTactWriteRecEntryDRec, xw_rec_type_1);
break;
case XT_LOG_ENT_REC_CLEANED:
ASSERT_NS(size == offsetof(XTTabRecHeadDRec, tr_prev_rec_id_4) + XT_RECORD_ID_SIZE);
XT_SET_DISK_4(log_entry.xw.xw_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.xw.xw_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.xw.xw_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.xw.xw_rec_id_4, rec_id);
len = offsetof(XTactWriteRecEntryDRec, xw_rec_type_1);
break;
case XT_LOG_ENT_REC_CLEANED_1:
ASSERT_NS(size == 1);
XT_SET_DISK_4(log_entry.xw.xw_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.xw.xw_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.xw.xw_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.xw.xw_rec_id_4, rec_id);
len = offsetof(XTactWriteRecEntryDRec, xw_rec_type_1);
break;
case XT_LOG_ENT_REC_UNLINKED:
ASSERT_NS(size == offsetof(XTTabRecHeadDRec, tr_prev_rec_id_4) + XT_RECORD_ID_SIZE);
XT_SET_DISK_4(log_entry.xw.xw_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.xw.xw_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.xw.xw_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.xw.xw_rec_id_4, rec_id);
len = offsetof(XTactWriteRecEntryDRec, xw_rec_type_1);
break;
case XT_LOG_ENT_ROW_NEW:
ASSERT_NS(size == 0);
XT_SET_DISK_4(log_entry.xa.xa_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.xa.xa_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.xa.xa_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.xa.xa_row_id_4, rec_id);
len = offsetof(XTactRowAddedEntryDRec, xa_row_id_4) + XT_ROW_ID_SIZE;
break;
case XT_LOG_ENT_ROW_NEW_FL:
ASSERT_NS(size == 0);
XT_SET_DISK_4(log_entry.xa.xa_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.xa.xa_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.xa.xa_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.xa.xa_row_id_4, rec_id);
XT_SET_DISK_4(log_entry.xa.xa_free_list_4, free_rec_id);
sum ^= XT_CHECKSUM4_REC(free_rec_id);
@@ -1602,10 +1604,17 @@ xtPublic xtBool xt_xlog_modify_table(str
case XT_LOG_ENT_ROW_FREED:
ASSERT_NS(size == sizeof(XTTabRowRefDRec));
XT_SET_DISK_4(log_entry.wr.wr_op_seq_4, op_seq);
- XT_SET_DISK_4(log_entry.wr.wr_tab_id_4, tab->tab_id);
+ XT_SET_DISK_4(log_entry.wr.wr_tab_id_4, tab_id);
XT_SET_DISK_4(log_entry.wr.wr_row_id_4, rec_id);
len = offsetof(XTactWriteRowEntryDRec, wr_ref_id_4);
break;
+ case XT_LOG_ENT_PREPARE:
+ check_size = 2;
+ XT_SET_DISK_4(log_entry.xp.xp_xact_id_4, op_seq);
+ log_entry.xp.xp_xa_len_1 = (xtWord1) size;
+ len = offsetof(XTXactPrepareEntryDRec, xp_xa_data);
+ commit = TRUE;
+ break;
default:
ASSERT_NS(FALSE);
len = 0;
@@ -1615,7 +1624,7 @@ xtPublic xtBool xt_xlog_modify_table(str
xtWord1 *dptr = data;
xtWord4 g;
- sum ^= op_seq ^ (tab->tab_id << 8) ^ XT_CHECKSUM4_REC(rec_id);
+ sum ^= op_seq ^ (tab_id << 8) ^ XT_CHECKSUM4_REC(rec_id);
if ((g = sum & 0xF0000000)) {
sum = sum ^ (g >> 24);
sum = sum ^ g;
@@ -1643,9 +1652,9 @@ xtPublic xtBool xt_xlog_modify_table(str
xt_print_log_record(0, 0, &log_entry);
#endif
if (xact)
- return thread->st_database->db_xlog.xlog_append(thread, len, (xtWord1 *) &log_entry, size, data, FALSE, &xact->xd_begin_log, &xact->xd_begin_offset);
+ return thread->st_database->db_xlog.xlog_append(thread, len, (xtWord1 *) &log_entry, size, data, commit, &xact->xd_begin_log, &xact->xd_begin_offset);
- return thread->st_database->db_xlog.xlog_append(thread, len, (xtWord1 *) &log_entry, size, data, FALSE, NULL, NULL);
+ return thread->st_database->db_xlog.xlog_append(thread, len, (xtWord1 *) &log_entry, size, data, commit, NULL, NULL);
}
/*
@@ -1905,6 +1914,7 @@ xtBool XTDatabaseLog::xlog_verify(XTXact
xtRecordID rec_id, free_rec_id;
int check_size = 1;
xtWord1 *dptr;
+ xtWord4 g;
switch (record->xh.xh_status_1) {
case XT_LOG_ENT_HEADER:
@@ -2019,13 +2029,19 @@ xtBool XTDatabaseLog::xlog_verify(XTXact
return record->xe.xe_checksum_1 == (XT_CHECKSUM_1(sum) ^ XT_CHECKSUM_1(log_id));
case XT_LOG_ENT_END_OF_LOG:
return FALSE;
+ case XT_LOG_ENT_PREPARE:
+ check_size = 2;
+ op_seq = XT_GET_DISK_4(record->xp.xp_xact_id_4);
+ tab_id = 0;
+ rec_id = 0;
+ dptr = record->xp.xp_xa_data;
+ rec_size -= offsetof(XTXactPrepareEntryDRec, xp_xa_data);
+ break;
default:
ASSERT_NS(FALSE);
return FALSE;
}
- xtWord4 g;
-
sum ^= (xtWord4) op_seq ^ ((xtWord4) tab_id << 8) ^ XT_CHECKSUM4_REC(rec_id);
if ((g = sum & 0xF0000000)) {
@@ -2193,6 +2209,14 @@ xtBool XTDatabaseLog::xlog_seq_next(XTXa
}
goto return_empty;
}
+ case XT_LOG_ENT_PREPARE:
+ check_size = 2;
+ len = offsetof(XTXactPrepareEntryDRec, xp_xa_data);
+ if (len > max_rec_len)
+ /* The size is not in the buffer: */
+ goto read_more;
+ len += (size_t) record->xp.xp_xa_len_1;
+ break;
default:
/* It is possible to land here after a crash, if the
* log was not completely written.
@@ -2231,7 +2255,7 @@ xtBool XTDatabaseLog::xlog_seq_next(XTXa
goto return_empty;
}
- /* The record is not completely in the buffer: */
+ /* The record is now completely in the buffer: */
seq->xseq_record_len = len;
*ret_entry = (XTXactLogBufferDPtr) seq->xseq_buffer;
return OK;
@@ -2428,7 +2452,7 @@ static void xlog_wr_wait_for_log_flush(X
if (reason == XT_LOG_CACHE_FULL || reason == XT_TIME_TO_WRITE || reason == XT_CHECKPOINT_REQ) {
/* Make sure that we have something to write: */
if (db->db_xlog.xlog_bytes_to_write() < 2 * 1204 * 1024)
- xt_xlog_flush_log(self);
+ xt_xlog_flush_log(db, self);
}
#ifdef TRACE_WRITER_ACTIVITY
@@ -2529,6 +2553,7 @@ static void xlog_wr_main(XTThreadPtr sel
case XT_LOG_ENT_ABORT:
case XT_LOG_ENT_CLEANUP:
case XT_LOG_ENT_OP_SYNC:
+ case XT_LOG_ENT_PREPARE:
break;
case XT_LOG_ENT_DEL_LOG:
xtLogID log_id;
=== modified file 'storage/pbxt/src/xactlog_xt.h'
--- a/storage/pbxt/src/xactlog_xt.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/xactlog_xt.h 2009-11-24 10:55:06 +0000
@@ -160,6 +160,7 @@ typedef struct XTXLogCache {
#define XT_LOG_ENT_END_OF_LOG 37 /* This is a record that indicates the end of the log, and
* fills to the end of a 512 byte block.
*/
+#define XT_LOG_ENT_PREPARE 39 /* XA prepare log entry. */
#define XT_LOG_FILE_MAGIC 0xAE88FE12
#define XT_LOG_VERSION_NO 1
@@ -201,6 +202,14 @@ typedef struct XTXactEndEntry {
XTDiskValue4 xe_not_used_4; /* Was the end sequence number (no longer used - v1.0.04+), set to zero). */
} XTXactEndEntryDRec, *XTXactEndEntryDPtr;
+typedef struct XTXactPrepareEntry {
+ xtWord1 xp_status_1; /* XT_LOG_ENT_PREPARE */
+ XTDiskValue2 xp_checksum_2;
+ XTDiskValue4 xp_xact_id_4; /* The transaction. */
+ xtWord1 xp_xa_len_1; /* The length of the XA data. */
+ xtWord1 xp_xa_data[XT_MAX_XA_DATA_SIZE];
+} XTXactPrepareEntryDRec, *XTXactPrepareEntryDPtr;
+
typedef struct XTXactCleanupEntry {
xtWord1 xc_status_1; /* XT_LOG_ENT_CLEANUP */
xtWord1 xc_checksum_1;
@@ -344,6 +353,7 @@ typedef union XTXactLogBuffer {
XTactOpSyncEntryDRec os;
XTactExtRecEntryDRec er;
XTactNoOpEntryDRec no;
+ XTXactPrepareEntryDRec xp;
} XTXactLogBufferDRec, *XTXactLogBufferDPtr;
/* ---------------------------------------- */
@@ -453,9 +463,9 @@ private:
xtBool xlog_open_log(xtLogID log_id, off_t curr_eof, struct XTThread *thread);
} XTDatabaseLogRec, *XTDatabaseLogPtr;
-xtBool xt_xlog_flush_log(struct XTThread *thread);
+xtBool xt_xlog_flush_log(struct XTDatabase *db, struct XTThread *thread);
xtBool xt_xlog_log_data(struct XTThread *thread, size_t len, XTXactLogBufferDPtr log_entry, xtBool commit);
-xtBool xt_xlog_modify_table(struct XTOpenTable *ot, u_int status, xtOpSeqNo op_seq, xtRecordID free_list, xtRecordID address, size_t size, xtWord1 *data);
+xtBool xt_xlog_modify_table(xtTableID tab_id, u_int status, xtOpSeqNo op_seq, xtRecordID free_list, xtRecordID address, size_t size, xtWord1 *data, struct XTThread *thread);
void xt_xlog_init(struct XTThread *self, size_t cache_size);
void xt_xlog_exit(struct XTThread *self);
=== modified file 'storage/pbxt/src/xt_config.h'
--- a/storage/pbxt/src/xt_config.h 2009-08-31 11:07:44 +0000
+++ b/storage/pbxt/src/xt_config.h 2009-11-24 10:55:06 +0000
@@ -50,7 +50,9 @@ const int max_connections = 500;
/*
* Make sure we use the thread safe version of the library.
*/
+#ifndef _THREAD_SAFE // Seems to be defined by some Drizzle header
#define _THREAD_SAFE
+#endif
/*
* This causes things to be defined like stuff in inttypes.h
@@ -72,12 +74,12 @@ const int max_connections = 500;
#define XT_MAC
#endif
-#if defined(MSDOS) || defined(__WIN__)
+#if defined(MSDOS) || defined(__WIN__) || defined(_WIN64)
#define XT_WIN
#endif
#ifdef XT_WIN
-#ifdef _DEBUG
+#if defined(_DEBUG) && !defined(DEBUG)
#define DEBUG
#endif // _DEBUG
#else
@@ -101,8 +103,13 @@ const int max_connections = 500;
* Definition of which atomic operations to use:
*/
#ifdef XT_WIN
+#ifdef _WIN64
+/* 64-bit Windows atomic ops are not yet supported: */
+#define XT_NO_ATOMICS
+#else
/* MS Studio style embedded assembler for x86 */
#define XT_ATOMIC_WIN32_X86
+#endif
#elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
/* Use GNU style embedded assembler for x86 */
#define XT_ATOMIC_GNUC_X86
@@ -115,4 +122,10 @@ const int max_connections = 500;
#define XT_NO_ATOMICS
#endif
+#ifndef DRIZZLED
+#if MYSQL_VERSION_ID >= 50404
+#define MYSQL_SUPPORTS_BACKUP
+#endif
+#endif
+
#endif
=== modified file 'storage/pbxt/src/xt_defs.h'
--- a/storage/pbxt/src/xt_defs.h 2009-08-17 11:12:36 +0000
+++ b/storage/pbxt/src/xt_defs.h 2009-11-24 10:55:06 +0000
@@ -379,6 +379,19 @@ typedef struct XTPathStr {
*/
//#define XT_IMPLEMENT_NO_ACTION
+/* Define this value if online-backup should be supported.
+ * Note that, online backup is currently only supported
+ * by MySQL 6.0.9 or later
+ */
+#define XT_ENABLE_ONLINE_BACKUP
+
+/* Define this switch if you don't want to use atomic
+ * synchronisation.
+ */
+#ifndef XT_NO_ATOMICS
+//#define XT_NO_ATOMICS
+#endif
+
/* ----------------------------------------------------------------------
* GLOBAL CONSTANTS
*/
@@ -406,6 +419,8 @@ typedef struct XTPathStr {
#define XT_ADD_PTR(p, l) ((void *) ((char *) (p) + (l)))
+#define XT_MAX_XA_DATA_SIZE (3*4 + 128) /* Corresponds to the maximum size of struct xid_t in handler.h. */
+
/* ----------------------------------------------------------------------
* DEFINES DEPENDENT ON CONSTANTS
*/
@@ -744,6 +759,7 @@ extern xtBool pbxt_crash_debug;
#define MYSQL_PLUGIN_VAR_HEADER DRIZZLE_PLUGIN_VAR_HEADER
#define MYSQL_SYSVAR_STR DRIZZLE_SYSVAR_STR
#define MYSQL_SYSVAR_INT DRIZZLE_SYSVAR_INT
+#define MYSQL_SYSVAR_BOOL DRIZZLE_SYSVAR_BOOL
#define MYSQL_SYSVAR DRIZZLE_SYSVAR
#define MYSQL_STORAGE_ENGINE_PLUGIN DRIZZLE_STORAGE_ENGINE_PLUGIN
#define MYSQL_INFORMATION_SCHEMA_PLUGIN DRIZZLE_INFORMATION_SCHEMA_PLUGIN
@@ -752,9 +768,8 @@ extern xtBool pbxt_crash_debug;
#define mx_tmp_use_all_columns(x, y) (x)->use_all_columns(y)
#define mx_tmp_restore_column_map(x, y) (x)->restore_column_map(y)
-#define MX_BIT_FAST_TEST_AND_SET(x, y) bitmap_test_and_set(x, y)
-#define MX_TABLE_TYPES_T handler::Table_flags
+#define MX_TABLE_TYPES_T Cursor::Table_flags
#define MX_UINT8_T uint8_t
#define MX_ULONG_T uint32_t
#define MX_ULONGLONG_T uint64_t
@@ -762,6 +777,10 @@ extern xtBool pbxt_crash_debug;
#define MX_CHARSET_INFO struct charset_info_st
#define MX_CONST_CHARSET_INFO const struct charset_info_st
#define MX_CONST const
+#define MX_BITMAP MyBitmap
+#define MX_BIT_SIZE() numOfBitsInMap()
+#define MX_BIT_SET(x, y) (x)->setBit(y)
+#define MX_BIT_FAST_TEST_AND_SET(x, y) (x)->testAndSet(y)
#define my_bool bool
#define int16 int16_t
@@ -771,6 +790,7 @@ extern xtBool pbxt_crash_debug;
#define uchar unsigned char
#define longlong int64_t
#define ulonglong uint64_t
+#define handler Cursor
#define HAVE_LONG_LONG
@@ -823,10 +843,13 @@ extern xtBool pbxt_crash_debug;
class PBXTStorageEngine;
typedef PBXTStorageEngine handlerton;
+class Session;
+
+extern "C" void session_mark_transaction_to_rollback(Session *session, bool all);
#else // DRIZZLED
/* The MySQL case: */
-#if MYSQL_VERSION_ID >= 60008
+#if MYSQL_VERSION_ID >= 50404
#define STRUCT_TABLE struct TABLE
#else
#define STRUCT_TABLE struct st_table
@@ -844,13 +867,13 @@ typedef PBXTStorageEngine handlerton;
#define MX_CHARSET_INFO CHARSET_INFO
#define MX_CONST_CHARSET_INFO struct charset_info_st
#define MX_CONST
+#define MX_BITMAP MY_BITMAP
+#define MX_BIT_SIZE() n_bits
+#define MX_BIT_SET(x, y) bitmap_set_bit(x, y)
#endif // DRIZZLED
-#define MX_BITMAP MY_BITMAP
-#define MX_BIT_SIZE() n_bits
#define MX_BIT_IS_SUBSET(x, y) bitmap_is_subset(x, y)
-#define MX_BIT_SET(x, y) bitmap_set_bit(x, y)
#ifndef XT_SCAN_CORE_DEFINED
#define XT_SCAN_CORE_DEFINED
=== modified file 'storage/pbxt/src/xt_errno.h'
--- a/storage/pbxt/src/xt_errno.h 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/xt_errno.h 2009-11-24 10:55:06 +0000
@@ -119,6 +119,9 @@
#define XT_ERR_FK_REF_TEMP_TABLE -95
#define XT_ERR_MYSQL_SHUTDOWN -98
#define XT_ERR_MYSQL_NO_THREAD -99
+#define XT_ERR_BUFFER_TOO_SMALL -100
+#define XT_ERR_BAD_BACKUP_FORMAT -101
+#define XT_ERR_PBXT_NOT_INSTALLED -102
#ifdef XT_WIN
#define XT_ENOMEM ERROR_NOT_ENOUGH_MEMORY
=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c 2009-11-30 12:42:24 +0000
+++ b/strings/ctype-ucs2.c 2009-12-03 12:02:37 +0000
@@ -1498,6 +1498,14 @@ void my_hash_sort_ucs2_bin(CHARSET_INFO
}
}
+
+static inline my_wc_t
+ucs2_to_wc(const uchar *ptr)
+{
+ return (((uint) ptr[0]) << 8) + ptr[1];
+}
+
+
/*
** Calculate min_str and max_str that ranges a LIKE string.
** Arguments:
@@ -1531,6 +1539,7 @@ my_bool my_like_range_ucs2(CHARSET_INFO
for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0
; ptr+=2, charlen--)
{
+ my_wc_t wc;
if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end)
{
ptr+=2; /* Skip escape */
@@ -1567,9 +1576,9 @@ fill_max_and_min:
}
if (have_contractions && ptr + 3 < end &&
- ptr[0] == '\0' &&
- my_uca_can_be_contraction_head(cs, (uchar) ptr[1]))
+ my_uca_can_be_contraction_head(cs, (wc= ucs2_to_wc((uchar*) ptr))))
{
+ my_wc_t wc2;
/* Contraction head found */
if (ptr[2] == '\0' && (ptr[3] == w_one || ptr[3] == w_many))
{
@@ -1581,9 +1590,8 @@ fill_max_and_min:
Check if the second letter can be contraction part,
and if two letters really produce a contraction.
*/
- if (ptr[2] == '\0' &&
- my_uca_can_be_contraction_tail(cs, (uchar) ptr[3]) &&
- my_uca_contraction2_weight(cs,(uchar) ptr[1], (uchar) ptr[3]))
+ if (my_uca_can_be_contraction_tail(cs, (wc2= ucs2_to_wc((uchar*) ptr + 2))) &&
+ my_uca_contraction2_weight(cs, wc , wc2))
{
/* Contraction found */
if (charlen == 1 || min_str + 2 >= min_end)
=== modified file 'unittest/mysys/Makefile.am'
--- a/unittest/mysys/Makefile.am 2009-11-26 08:44:38 +0000
+++ b/unittest/mysys/Makefile.am 2009-12-03 11:19:05 +0000
@@ -24,7 +24,7 @@ LDADD = $(top_builddir)/unittest/mytap
$(top_builddir)/strings/libmystrings.a
EXTRA_DIST = CMakeLists.txt
-noinst_PROGRAMS = bitmap-t base64-t lf-t waiting_threads-t
+noinst_PROGRAMS = bitmap-t base64-t my_atomic-t lf-t waiting_threads-t
if NEED_THREAD
# my_atomic-t is used to check thread functions, so it is safe to
1
0