mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-22836: Server crashes in err_conv / ErrBuff::set_str
The issue here is charset for Sort_param::tmp_buffer is cleared when bzero is done for Sort_param. Make sure to set the charset explicitly in the constructor for tmp_buffer.
This commit is contained in:
@ -545,6 +545,11 @@ public:
|
||||
{
|
||||
memset(reinterpret_cast<void*>(this), 0, sizeof(*this));
|
||||
tmp_buffer.set_thread_specific();
|
||||
/*
|
||||
Fix memset() clearing the charset.
|
||||
TODO: The constructor should be eventually rewritten not to use memset().
|
||||
*/
|
||||
tmp_buffer.set_charset(&my_charset_bin);
|
||||
}
|
||||
void init_for_filesort(uint sortlen, TABLE *table,
|
||||
ha_rows maxrows, bool sort_positions);
|
||||
|
Reference in New Issue
Block a user