mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed reference to uninitialized memory
This commit is contained in:
@ -49,7 +49,7 @@ select * from t1 where parent_id=102;
|
|||||||
explain select level from t1 where level=1;
|
explain select level from t1 where level=1;
|
||||||
--replace_result 12 # 6 #
|
--replace_result 12 # 6 #
|
||||||
explain select level,id from t1 where level=1;
|
explain select level,id from t1 where level=1;
|
||||||
--replace_result 12 # 6 #
|
--replace_result 12 # 6 # 5 #
|
||||||
explain select level,id,parent_id from t1 where level=1;
|
explain select level,id,parent_id from t1 where level=1;
|
||||||
select level,id from t1 where level=1;
|
select level,id from t1 where level=1;
|
||||||
select level,id,parent_id from t1 where level=1;
|
select level,id,parent_id from t1 where level=1;
|
||||||
|
@ -1585,14 +1585,15 @@ static uchar to_upper_utf8[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static int my_utf8_uni (CHARSET_INFO *cs __attribute__((unused)) ,
|
static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
|
||||||
my_wc_t * pwc, const uchar *s, const uchar *e)
|
my_wc_t * pwc, const uchar *s, const uchar *e)
|
||||||
{
|
{
|
||||||
unsigned char c = s[0];
|
unsigned char c;
|
||||||
|
|
||||||
if (s >= e)
|
if (s >= e)
|
||||||
return MY_CS_TOOFEW(0);
|
return MY_CS_TOOFEW(0);
|
||||||
|
|
||||||
|
c= s[0];
|
||||||
if (c < 0x80)
|
if (c < 0x80)
|
||||||
{
|
{
|
||||||
*pwc = c;
|
*pwc = c;
|
||||||
@ -1624,10 +1625,8 @@ static int my_utf8_uni (CHARSET_INFO *cs __attribute__((unused)) ,
|
|||||||
(my_wc_t) (s[2] ^ 0x80);
|
(my_wc_t) (s[2] ^ 0x80);
|
||||||
|
|
||||||
return 3;
|
return 3;
|
||||||
|
|
||||||
#ifdef UNICODE_32BIT
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#ifdef UNICODE_32BIT
|
||||||
else if (c < 0xf8 && sizeof(my_wc_t)*8 >= 32)
|
else if (c < 0xf8 && sizeof(my_wc_t)*8 >= 32)
|
||||||
{
|
{
|
||||||
if (s+4 > e) /* We need 4 characters */
|
if (s+4 > e) /* We need 4 characters */
|
||||||
@ -1685,9 +1684,9 @@ static int my_utf8_uni (CHARSET_INFO *cs __attribute__((unused)) ,
|
|||||||
| ((my_wc_t) (s[4] ^ 0x80) << 6)
|
| ((my_wc_t) (s[4] ^ 0x80) << 6)
|
||||||
| (my_wc_t) (s[5] ^ 0x80);
|
| (my_wc_t) (s[5] ^ 0x80);
|
||||||
return 6;
|
return 6;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
} else
|
return MY_CS_ILSEQ;
|
||||||
return MY_CS_ILSEQ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int my_uni_utf8 (CHARSET_INFO *cs __attribute__((unused)) ,
|
static int my_uni_utf8 (CHARSET_INFO *cs __attribute__((unused)) ,
|
||||||
|
Reference in New Issue
Block a user