File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
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.
3
3
4
4
This program is free software; you can redistribute it and/or modify
5
5
it under the terms of the GNU General Public License as published by
@@ -3649,6 +3649,17 @@ String *Item_func_quote::val_str(String *str)
3649
3649
*to= ' \' ' ;
3650
3650
3651
3651
ret:
3652
+ if (new_length > current_thd->variables .max_allowed_packet )
3653
+ {
3654
+ push_warning_printf (current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
3655
+ ER_WARN_ALLOWED_PACKET_OVERFLOWED,
3656
+ ER_THD (current_thd, ER_WARN_ALLOWED_PACKET_OVERFLOWED),
3657
+ func_name (),
3658
+ current_thd->variables .max_allowed_packet );
3659
+ null_value= true ;
3660
+ return NULL ;
3661
+ }
3662
+
3652
3663
tmp_value.length (new_length);
3653
3664
tmp_value.set_charset (collation.collation );
3654
3665
null_value= 0 ;
You can’t perform that action at this time.
0 commit comments