mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
This commit is contained in:
@ -847,6 +847,15 @@ append_identifier(THD *thd, String *packet, const char *name, uint length)
|
||||
{
|
||||
uchar chr= (uchar) *name;
|
||||
length= my_mbcharlen(system_charset_info, chr);
|
||||
/*
|
||||
my_mbcharlen can retur 0 on a wrong multibyte
|
||||
sequence. It is possible when upgrading from 4.0,
|
||||
and identifier contains some accented characters.
|
||||
The manual says it does not work. So we'll just
|
||||
change length to 1 not to hang in the endless loop.
|
||||
*/
|
||||
if (!length)
|
||||
length= 1;
|
||||
if (length == 1 && chr == (uchar) quote_char)
|
||||
packet->append("e_char, 1, system_charset_info);
|
||||
packet->append(name, length, packet->charset());
|
||||
|
Reference in New Issue
Block a user