mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 00:54:30 +02:00
Merge from mysql-5.1.57-release
This commit is contained in:
commit
83f19ef457
12 changed files with 329 additions and 33 deletions
|
|
@ -2444,6 +2444,19 @@ String *Item_char_typecast::val_str(String *str)
|
|||
String *res;
|
||||
uint32 length;
|
||||
|
||||
if (cast_length >= 0 &&
|
||||
((unsigned) cast_length) > current_thd->variables.max_allowed_packet)
|
||||
{
|
||||
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
|
||||
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
|
||||
cast_cs == &my_charset_bin ?
|
||||
"cast_as_binary" : func_name(),
|
||||
current_thd->variables.max_allowed_packet);
|
||||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!charset_conversion)
|
||||
{
|
||||
if (!(res= args[0]->val_str(str)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue