mirror of
https://github.com/MariaDB/server.git
synced 2026-05-03 21:55:33 +02:00
Merge into latest 5.3
This commit is contained in:
commit
4092d08bb8
44 changed files with 1145 additions and 450 deletions
18
sql/item.cc
18
sql/item.cc
|
|
@ -942,15 +942,31 @@ void Item::set_name(const char *str, uint length, CHARSET_INFO *cs)
|
|||
if (!my_charset_same(cs, system_charset_info))
|
||||
{
|
||||
size_t res_length;
|
||||
name= sql_strmake_with_convert(str, name_length= length, cs,
|
||||
name= sql_strmake_with_convert(str, length, cs,
|
||||
MAX_ALIAS_NAME, system_charset_info,
|
||||
&res_length);
|
||||
name_length= res_length;
|
||||
}
|
||||
else
|
||||
name= sql_strmake(str, (name_length= min(length,MAX_ALIAS_NAME)));
|
||||
}
|
||||
|
||||
|
||||
void Item::set_name_no_truncate(const char *str, uint length, CHARSET_INFO *cs)
|
||||
{
|
||||
if (!my_charset_same(cs, system_charset_info))
|
||||
{
|
||||
size_t res_length;
|
||||
name= sql_strmake_with_convert(str, length, cs,
|
||||
UINT_MAX, system_charset_info,
|
||||
&res_length);
|
||||
name_length= res_length;
|
||||
}
|
||||
else
|
||||
name= sql_strmake(str, (name_length= length));
|
||||
}
|
||||
|
||||
|
||||
void Item::set_name_for_rollback(THD *thd, const char *str, uint length,
|
||||
CHARSET_INFO *cs)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue