We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 39d25a8 + 5c06bfa commit 9ea89b3Copy full SHA for 9ea89b3
sql/item_strfunc.cc
@@ -4907,6 +4907,16 @@ String *Item_func_quote::val_str(String *str)
4907
*to= '\'';
4908
4909
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
+
4920
tmp_value.length(new_length);
4921
tmp_value.set_charset(collation.collation);
4922
null_value= 0;
0 commit comments