mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
New scan() function in CHARSET_INFO structure (not used yet)
This commit is contained in:
parent
4306940bb4
commit
2a41e291dc
16 changed files with 104 additions and 33 deletions
|
|
@ -6257,7 +6257,8 @@ CHARSET_INFO my_charset_big5 =
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ static CHARSET_INFO my_charset_bin_st =
|
|||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -634,7 +634,8 @@ CHARSET_INFO my_charset_czech =
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -8674,7 +8674,8 @@ CHARSET_INFO my_charset_euc_kr =
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5724,7 +5724,8 @@ CHARSET_INFO my_charset_gb2312 =
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9912,6 +9912,7 @@ CHARSET_INFO my_charset_gbk =
|
|||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -452,7 +452,8 @@ CHARSET_INFO my_charset_latin1_de =
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -968,3 +968,29 @@ my_bool my_like_range_simple(CHARSET_INFO *cs,
|
|||
*min_str++ = *max_str++ = ' '; // Because if key compression
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
|
||||
{
|
||||
const char *str0= str;
|
||||
switch (sq)
|
||||
{
|
||||
case MY_SEQ_INTTAIL:
|
||||
if (*str == '.')
|
||||
{
|
||||
for(str++ ; str != end && *str == '0' ; str++);
|
||||
return str-str0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
case MY_SEQ_SPACES:
|
||||
for (str++ ; str != end ; str++)
|
||||
{
|
||||
if (!my_isspace(cs,*str))
|
||||
break;
|
||||
}
|
||||
return str-str0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4498,7 +4498,8 @@ CHARSET_INFO my_charset_sjis =
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -726,7 +726,8 @@ CHARSET_INFO my_charset_tis620 =
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8468,7 +8468,8 @@ CHARSET_INFO my_charset_ujis =
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2000,6 +2000,7 @@ CHARSET_INFO my_charset_utf8 =
|
|||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -3073,7 +3074,8 @@ CHARSET_INFO my_charset_ucs2 =
|
|||
my_strntoul_ucs2,
|
||||
my_strntoll_ucs2,
|
||||
my_strntoull_ucs2,
|
||||
my_strntod_ucs2
|
||||
my_strntod_ucs2,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -660,7 +660,8 @@ CHARSET_INFO my_charset_win1250ch =
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2849,7 +2849,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -2895,7 +2896,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -2940,7 +2942,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -2985,7 +2988,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3031,7 +3035,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3076,7 +3081,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3121,7 +3127,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3166,7 +3173,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3212,7 +3220,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3257,7 +3266,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3302,7 +3312,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3347,7 +3358,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3392,7 +3404,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3437,7 +3450,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3482,7 +3496,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3528,7 +3543,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3573,7 +3589,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3619,7 +3636,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3665,7 +3683,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3710,7 +3729,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3755,7 +3775,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3800,7 +3821,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3845,7 +3867,8 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
my_strntoul_8bit,
|
||||
my_strntoll_8bit,
|
||||
my_strntoull_8bit,
|
||||
my_strntod_8bit
|
||||
my_strntod_8bit,
|
||||
my_scan_8bit
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
@ -3891,6 +3914,7 @@ static CHARSET_INFO compiled_charsets[] = {
|
|||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue