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
@@ -4346,6 +4346,17 @@ String *Item_func_quote::val_str(String *str)
4346
4346
*to= ' \' ' ;
4347
4347
4348
4348
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
+
4349
4360
tmp_value.length (new_length);
4350
4361
tmp_value.set_charset (collation.collation );
4351
4362
null_value= 0 ;
You can’t perform that action at this time.
0 commit comments