mirror of
https://github.com/MariaDB/server.git
synced 2026-05-03 21:55:33 +02:00
Merge from 5.1.
This commit is contained in:
commit
96703a63da
42 changed files with 1143 additions and 449 deletions
18
sql/item.cc
18
sql/item.cc
|
|
@ -769,15 +769,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));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@details
|
||||
This function is called when:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue