need to handle "ER_WARN_ALLOWED_PACKET_OVERFLOWED" for some string functions #7153
Open
9 of 13 tasks
Labels
component/expression
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
type/compatibility
Take this as an example:
In MySQL, the result is NULL and a warning about "Result of rpad() was larger than max_allowed_packet" is returned:
In TiDB, this query results in a "lost connection" and the panic is "runtime error: makeslice: len out of range", and the panic stack is:
What we need to do is not allocate a buffer larger than "max_allowed_packet" for these string functions:
All the above functions implemented in MySQL are located in the "sql/item_strfunc.cc" file, you can grep the function name to see specific implementations.
All the above functions can be found in TiDB from the source file "expression/builtin.go".
The text was updated successfully, but these errors were encountered: