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

into deer.mysql.r18.ru:/home/hf/work/mysql-default


sql/field.h:
  Auto merged
This commit is contained in:
unknown 2003-01-28 15:06:23 +04:00
commit 7120b66884
18 changed files with 57 additions and 11 deletions

View file

@ -144,6 +144,8 @@ typedef struct charset_info_st
int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
int radix, longlong val);
void (*fill)(struct charset_info_st *, char *to, uint len, int fill);
/* String-to-number convertion routines */
long (*strntol)(struct charset_info_st *, const char *s, uint l,
int base, char **e, int *err);
@ -220,6 +222,8 @@ int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
longlong val);
void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
my_bool my_like_range_simple(CHARSET_INFO *cs,
const char *ptr, uint ptr_length,
int escape, int w_one, int w_many,

View file

@ -75,6 +75,7 @@ static void simple_cs_init_functions(CHARSET_INFO *cs)
cs->snprintf = my_snprintf_8bit;
cs->long10_to_str= my_long10_to_str_8bit;
cs->longlong10_to_str= my_longlong10_to_str_8bit;
cs->fill = my_fill_8bit;
cs->strntol = my_strntol_8bit;
cs->strntoul = my_strntoul_8bit;
cs->strntoll = my_strntoll_8bit;

View file

@ -3880,7 +3880,7 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs)
{
memcpy(ptr,from,length);
if (length < field_length)
bfill(ptr+length,field_length-length,' ');
field_charset->fill(field_charset,ptr+length,field_length-length,' ');
}
else
{
@ -3888,14 +3888,12 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs)
if (current_thd->count_cuted_fields)
{ // Check if we loosed some info
const char *end=from+length;
for (from+=field_length ; from != end ; from++)
from+= field_length;
from+= field_charset->scan(field_charset, from, end, MY_SEQ_SPACES);
if (from != end)
{
if (!my_isspace(field_charset,*from))
{
current_thd->cuted_fields++;
error=1;
break;
}
current_thd->cuted_fields++;
error=1;
}
}
}

View file

@ -788,7 +788,7 @@ public:
enum ha_base_keytype key_type() const
{ return binary() ? HA_KEYTYPE_BINARY : HA_KEYTYPE_TEXT; }
bool zero_pack() const { return 0; }
void reset(void) { bfill(ptr,field_length,' '); }
void reset(void) { charset()->fill(charset(),ptr,field_length,' '); }
int store(const char *to,uint length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr);

View file

@ -6258,7 +6258,8 @@ CHARSET_INFO my_charset_big5 =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -306,6 +306,7 @@ static CHARSET_INFO my_charset_bin_st =
my_snprintf_8bit, /* snprintf */
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -630,6 +630,7 @@ CHARSET_INFO my_charset_czech =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -8676,6 +8676,7 @@ CHARSET_INFO my_charset_euc_kr =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -5726,6 +5726,7 @@ CHARSET_INFO my_charset_gb2312 =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -9913,6 +9913,7 @@ CHARSET_INFO my_charset_gbk =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -448,6 +448,7 @@ CHARSET_INFO my_charset_latin1_de =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -1000,7 +1000,7 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
return 0;
case MY_SEQ_SPACES:
for (; str != end ; str++)
for ( ; str < end ; str++)
{
if (!my_isspace(cs,*str))
break;
@ -1010,3 +1010,9 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
return 0;
}
}
void my_fill_8bit(CHARSET_INFO *cs __attribute__((unused)),
char *s, uint l, int fill)
{
bfill(s,l,fill);
}

View file

@ -4500,6 +4500,7 @@ CHARSET_INFO my_charset_sjis =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -722,6 +722,7 @@ CHARSET_INFO my_charset_tis620 =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -8467,6 +8467,7 @@ CHARSET_INFO my_charset_ujis =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -2001,6 +2001,7 @@ CHARSET_INFO my_charset_utf8 =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3089,6 +3090,7 @@ CHARSET_INFO my_charset_ucs2 =
my_snprintf_ucs2,
my_l10tostr_ucs2,
my_ll10tostr_ucs2,
my_fill_8bit,
my_strntol_ucs2,
my_strntoul_ucs2,
my_strntoll_ucs2,

View file

@ -666,6 +666,7 @@ CHARSET_INFO my_charset_win1250ch =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,

View file

@ -2845,6 +2845,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -2892,6 +2893,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -2938,6 +2940,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -2984,6 +2987,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3031,6 +3035,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3077,6 +3082,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3123,6 +3129,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3169,6 +3176,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3216,6 +3224,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3262,6 +3271,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3308,6 +3318,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3354,6 +3365,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3400,6 +3412,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3446,6 +3459,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3492,6 +3506,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3539,6 +3554,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3585,6 +3601,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3632,6 +3649,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3679,6 +3697,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3725,6 +3744,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3771,6 +3791,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3817,6 +3838,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3863,6 +3885,7 @@ static CHARSET_INFO compiled_charsets[] = {
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@ -3915,6 +3938,7 @@ static CHARSET_INFO compiled_charsets[] = {
NULL,
NULL,
NULL,
NULL,
NULL
}
};