Commit e8b101a8 authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

Merge abarkov@work.mysql.com:/home/bk/mysql-4.1

into bar.mysql.r18.ru:/usr/home/bar/mysql-4.1.wrk
parents 063ffd2d 098b9744
...@@ -389,6 +389,7 @@ static CHARSET_INFO *add_charset(CHARSET_INFO *cs, myf flags) ...@@ -389,6 +389,7 @@ static CHARSET_INFO *add_charset(CHARSET_INFO *cs, myf flags)
cs->hash_caseup = my_hash_caseup_simple; cs->hash_caseup = my_hash_caseup_simple;
cs->hash_sort = my_hash_sort_simple; cs->hash_sort = my_hash_sort_simple;
cs->snprintf = my_snprintf_8bit; cs->snprintf = my_snprintf_8bit;
cs->mbmaxlen = 1;
set_max_sort_char(cs); set_max_sort_char(cs);
create_fromuni(cs); create_fromuni(cs);
......
...@@ -46,7 +46,7 @@ static void _print_csinfo(CHARSET_INFO *cs) ...@@ -46,7 +46,7 @@ static void _print_csinfo(CHARSET_INFO *cs)
cs->strnxfrm, cs->strnxfrm,
cs->like_range); cs->like_range);
printf("multi-byte: %3s (%d, %p, %p, %p)\n", printf("multi-byte: %3s (%d, %p, %p, %p)\n",
cs->mbmaxlen ? "yes" : "no", cs->mbmaxlen > 1 ? "yes" : "no",
cs->mbmaxlen, cs->mbmaxlen,
cs->ismbchar, cs->ismbchar,
cs->ismbhead, cs->ismbhead,
......
...@@ -1928,7 +1928,7 @@ String *Item_func_conv_charset::val_str(String *str) ...@@ -1928,7 +1928,7 @@ String *Item_func_conv_charset::val_str(String *str)
s=(const uchar*)arg->ptr(); s=(const uchar*)arg->ptr();
se=s+arg->length(); se=s+arg->length();
dmaxlen=arg->length()*(to->mbmaxlen?to->mbmaxlen:1)+1; dmaxlen=arg->length()*to->mbmaxlen+1;
str->alloc(dmaxlen); str->alloc(dmaxlen);
d0=d=(unsigned char*)str->ptr(); d0=d=(unsigned char*)str->ptr();
de=d+dmaxlen; de=d+dmaxlen;
...@@ -1970,7 +1970,7 @@ String *Item_func_conv_charset::val_str(String *str) ...@@ -1970,7 +1970,7 @@ String *Item_func_conv_charset::val_str(String *str)
void Item_func_conv_charset::fix_length_and_dec() void Item_func_conv_charset::fix_length_and_dec()
{ {
max_length = args[0]->max_length*(conv_charset->mbmaxlen?conv_charset->mbmaxlen:1); max_length = args[0]->max_length*conv_charset->mbmaxlen;
set_charset(conv_charset); set_charset(conv_charset);
} }
...@@ -2002,7 +2002,7 @@ String *Item_func_conv_charset3::val_str(String *str) ...@@ -2002,7 +2002,7 @@ String *Item_func_conv_charset3::val_str(String *str)
s=(const uchar*)arg->ptr(); s=(const uchar*)arg->ptr();
se=s+arg->length(); se=s+arg->length();
dmaxlen=arg->length()*(to_charset->mbmaxlen?to_charset->mbmaxlen:1)+1; dmaxlen=arg->length()*to_charset->mbmaxlen+1;
str->alloc(dmaxlen); str->alloc(dmaxlen);
d0=d=(unsigned char*)str->ptr(); d0=d=(unsigned char*)str->ptr();
de=d+dmaxlen; de=d+dmaxlen;
......
...@@ -1424,7 +1424,7 @@ int mysqld_show_charsets(THD *thd, const char *wild) ...@@ -1424,7 +1424,7 @@ int mysqld_show_charsets(THD *thd, const char *wild)
net_store_data(&packet2,convert,cs[0]->name); net_store_data(&packet2,convert,cs[0]->name);
net_store_data(&packet2,(uint32) cs[0]->number); net_store_data(&packet2,(uint32) cs[0]->number);
net_store_data(&packet2,(uint32) cs[0]->strxfrm_multiply); net_store_data(&packet2,(uint32) cs[0]->strxfrm_multiply);
net_store_data(&packet2,(uint32) (cs[0]->mbmaxlen ? cs[0]->mbmaxlen : 1)); net_store_data(&packet2,(uint32) (cs[0]->mbmaxlen));
if (my_net_write(&thd->net, (char*) packet2.ptr(),packet2.length())) if (my_net_write(&thd->net, (char*) packet2.ptr(),packet2.length()))
goto err; goto err;
......
...@@ -162,7 +162,7 @@ static CHARSET_INFO my_charset_bin_st = ...@@ -162,7 +162,7 @@ static CHARSET_INFO my_charset_bin_st =
my_strnncoll_binary, /* strnncoll */ my_strnncoll_binary, /* strnncoll */
NULL, /* strxnfrm */ NULL, /* strxnfrm */
NULL, /* like_rabge */ NULL, /* like_rabge */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
......
...@@ -610,7 +610,7 @@ CHARSET_INFO my_charset_czech = ...@@ -610,7 +610,7 @@ CHARSET_INFO my_charset_czech =
my_strnncoll_czech, my_strnncoll_czech,
my_strnxfrm_czech, my_strnxfrm_czech,
my_like_range_czech, my_like_range_czech,
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
......
...@@ -428,7 +428,7 @@ CHARSET_INFO my_charset_latin1_de = ...@@ -428,7 +428,7 @@ CHARSET_INFO my_charset_latin1_de =
my_strnncoll_latin1_de, my_strnncoll_latin1_de,
my_strnxfrm_latin1_de, my_strnxfrm_latin1_de,
my_like_range_latin1_de, my_like_range_latin1_de,
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
......
...@@ -702,7 +702,7 @@ CHARSET_INFO my_charset_tis620 = ...@@ -702,7 +702,7 @@ CHARSET_INFO my_charset_tis620 =
my_strnncoll_tis620, my_strnncoll_tis620,
my_strnxfrm_tis620, my_strnxfrm_tis620,
my_like_range_tis620, my_like_range_tis620,
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
......
...@@ -636,7 +636,7 @@ CHARSET_INFO my_charset_win1250ch = ...@@ -636,7 +636,7 @@ CHARSET_INFO my_charset_win1250ch =
my_strnncoll_win1250ch, my_strnncoll_win1250ch,
my_strnxfrm_win1250ch, my_strnxfrm_win1250ch,
my_like_range_win1250ch, my_like_range_win1250ch,
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
......
...@@ -2823,7 +2823,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -2823,7 +2823,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -2860,7 +2860,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -2860,7 +2860,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -2896,7 +2896,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -2896,7 +2896,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -2932,7 +2932,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -2932,7 +2932,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -2969,7 +2969,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -2969,7 +2969,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3005,7 +3005,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3005,7 +3005,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3041,7 +3041,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3041,7 +3041,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3077,7 +3077,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3077,7 +3077,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3114,7 +3114,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3114,7 +3114,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3150,7 +3150,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3150,7 +3150,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3186,7 +3186,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3186,7 +3186,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3222,7 +3222,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3222,7 +3222,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3258,7 +3258,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3258,7 +3258,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3294,7 +3294,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3294,7 +3294,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3330,7 +3330,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3330,7 +3330,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3367,7 +3367,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3367,7 +3367,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3403,7 +3403,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3403,7 +3403,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3440,7 +3440,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3440,7 +3440,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3477,7 +3477,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3477,7 +3477,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3513,7 +3513,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3513,7 +3513,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3549,7 +3549,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3549,7 +3549,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3585,7 +3585,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3585,7 +3585,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
...@@ -3621,7 +3621,7 @@ static CHARSET_INFO compiled_charsets[] = { ...@@ -3621,7 +3621,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_strnncoll_simple,/* strnncoll */ my_strnncoll_simple,/* strnncoll */
NULL, /* strnxfrm */ NULL, /* strnxfrm */
NULL, /* like_range */ NULL, /* like_range */
0, /* mbmaxlen */ 1, /* mbmaxlen */
NULL, /* ismbchar */ NULL, /* ismbchar */
NULL, /* ismbhead */ NULL, /* ismbhead */
NULL, /* mbcharlen */ NULL, /* mbcharlen */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment