Skip to content

Commit 5c06bfa

Browse files
author
Ajo Robert
committed
Merge branch 'mysql-5.5' into mysql-5.6
2 parents 8b8334e + b21a021 commit 5c06bfa

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

sql/item_strfunc.cc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -4346,6 +4346,17 @@ String *Item_func_quote::val_str(String *str)
43464346
*to= '\'';
43474347

43484348
ret:
4349+
if (new_length > current_thd->variables.max_allowed_packet)
4350+
{
4351+
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
4352+
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
4353+
ER_THD(current_thd, ER_WARN_ALLOWED_PACKET_OVERFLOWED),
4354+
func_name(),
4355+
current_thd->variables.max_allowed_packet);
4356+
null_value= true;
4357+
return NULL;
4358+
}
4359+
43494360
tmp_value.length(new_length);
43504361
tmp_value.set_charset(collation.collation);
43514362
null_value= 0;

0 commit comments

Comments
 (0)