mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
Merge MySQL 5.1.39 into MariaDB 5.1.
This commit is contained in:
commit
6aad537a6a
145 changed files with 6241 additions and 1040 deletions
|
|
@ -203,11 +203,10 @@ static int my_strnncoll_ucs2(CHARSET_INFO *cs,
|
|||
my_bool t_is_prefix)
|
||||
{
|
||||
int s_res,t_res;
|
||||
my_wc_t s_wc,t_wc;
|
||||
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;
|
||||
LINT_INIT(s_wc);
|
||||
|
||||
while ( s < se && t < te )
|
||||
{
|
||||
|
|
@ -318,12 +317,10 @@ static int my_strncasecmp_ucs2(CHARSET_INFO *cs,
|
|||
const char *s, const char *t, size_t len)
|
||||
{
|
||||
int s_res,t_res;
|
||||
my_wc_t s_wc,t_wc;
|
||||
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;
|
||||
LINT_INIT(s_wc);
|
||||
LINT_INIT(t_wc);
|
||||
|
||||
while ( s < se && t < te )
|
||||
{
|
||||
|
|
@ -1387,11 +1384,9 @@ int my_strnncoll_ucs2_bin(CHARSET_INFO *cs,
|
|||
my_bool t_is_prefix)
|
||||
{
|
||||
int s_res,t_res;
|
||||
my_wc_t s_wc,t_wc;
|
||||
my_wc_t UNINIT_VAR(s_wc),t_wc;
|
||||
const uchar *se=s+slen;
|
||||
const uchar *te=t+tlen;
|
||||
LINT_INIT(s_wc);
|
||||
LINT_INIT(t_wc);
|
||||
|
||||
while ( s < se && t < te )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2310,12 +2310,10 @@ static int my_strnncoll_utf8(CHARSET_INFO *cs,
|
|||
my_bool t_is_prefix)
|
||||
{
|
||||
int s_res,t_res;
|
||||
my_wc_t s_wc,t_wc;
|
||||
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;
|
||||
LINT_INIT(s_wc);
|
||||
LINT_INIT(t_wc);
|
||||
|
||||
while ( s < se && t < te )
|
||||
{
|
||||
|
|
@ -2382,11 +2380,9 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs,
|
|||
my_bool diff_if_only_endspace_difference)
|
||||
{
|
||||
int s_res, t_res, res;
|
||||
my_wc_t s_wc,t_wc;
|
||||
my_wc_t UNINIT_VAR(s_wc),t_wc;
|
||||
const uchar *se= s+slen, *te= t+tlen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
LINT_INIT(s_wc);
|
||||
LINT_INIT(t_wc);
|
||||
|
||||
#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE
|
||||
diff_if_only_endspace_difference= 0;
|
||||
|
|
|
|||
|
|
@ -1365,8 +1365,7 @@ int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale)
|
|||
if (intg0x)
|
||||
{
|
||||
int i=dig2bytes[intg0x];
|
||||
dec1 x;
|
||||
LINT_INIT(x);
|
||||
dec1 UNINIT_VAR(x);
|
||||
switch (i)
|
||||
{
|
||||
case 1: x=mi_sint1korr(from); break;
|
||||
|
|
@ -1407,8 +1406,7 @@ int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale)
|
|||
if (frac0x)
|
||||
{
|
||||
int i=dig2bytes[frac0x];
|
||||
dec1 x;
|
||||
LINT_INIT(x);
|
||||
dec1 UNINIT_VAR(x);
|
||||
switch (i)
|
||||
{
|
||||
case 1: x=mi_sint1korr(from); break;
|
||||
|
|
@ -1486,7 +1484,7 @@ decimal_round(decimal_t *from, decimal_t *to, int scale,
|
|||
decimal_round_mode mode)
|
||||
{
|
||||
int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1,
|
||||
frac1=ROUND_UP(from->frac), round_digit,
|
||||
frac1=ROUND_UP(from->frac), UNINIT_VAR(round_digit),
|
||||
intg0=ROUND_UP(from->intg), error=E_DEC_OK, len=to->len,
|
||||
intg1=ROUND_UP(from->intg +
|
||||
(((intg0 + frac0)>0) && (from->buf[0] == DIG_MAX)));
|
||||
|
|
@ -1495,7 +1493,6 @@ decimal_round(decimal_t *from, decimal_t *to, int scale,
|
|||
|
||||
sanity(to);
|
||||
|
||||
LINT_INIT(round_digit);
|
||||
switch (mode) {
|
||||
case HALF_UP:
|
||||
case HALF_EVEN: round_digit=5; break;
|
||||
|
|
@ -2123,13 +2120,11 @@ static int do_div_mod(decimal_t *from1, decimal_t *from2,
|
|||
{
|
||||
int frac1=ROUND_UP(from1->frac)*DIG_PER_DEC1, prec1=from1->intg+frac1,
|
||||
frac2=ROUND_UP(from2->frac)*DIG_PER_DEC1, prec2=from2->intg+frac2,
|
||||
error, i, intg0, frac0, len1, len2, dintg, div_mod=(!mod);
|
||||
UNINIT_VAR(error), i, intg0, frac0, len1, len2, dintg, div_mod=(!mod);
|
||||
dec1 *buf0, *buf1=from1->buf, *buf2=from2->buf, *tmp1,
|
||||
*start2, *stop2, *stop1, *stop0, norm2, carry, *start1, dcarry;
|
||||
dec2 norm_factor, x, guess, y;
|
||||
|
||||
LINT_INIT(error);
|
||||
|
||||
if (mod)
|
||||
to=mod;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue