Skip to content

Commit 9ea89b3

Browse files
author
Ajo Robert
committed
Merge branch 'mysql-5.6' into mysql-5.7
2 parents 39d25a8 + 5c06bfa commit 9ea89b3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sql/item_strfunc.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4907,6 +4907,16 @@ String *Item_func_quote::val_str(String *str)
49074907
*to= '\'';
49084908

49094909
ret:
4910+
if (new_length > current_thd->variables.max_allowed_packet)
4911+
{
4912+
push_warning_printf(current_thd, Sql_condition::SL_WARNING,
4913+
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
4914+
ER_THD(current_thd, ER_WARN_ALLOWED_PACKET_OVERFLOWED),
4915+
func_name(),
4916+
current_thd->variables.max_allowed_packet);
4917+
return error_str();
4918+
}
4919+
49104920
tmp_value.length(new_length);
49114921
tmp_value.set_charset(collation.collation);
49124922
null_value= 0;

0 commit comments

Comments
 (0)