Bug #98379 Contribution by Facebook: Fix mysqldump handling of varbinary columns
Submitted: 25 Jan 2020 16:50 Modified: 7 Apr 2023 19:36
Reporter: FBContrib Admin Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:8.0.17 OS:Any
Assigned to: CPU Architecture:Any

[25 Jan 2020 16:50] FBContrib Admin
Description:
Background innformation provided by Facebook:
    https://bugs.mysql.com/bug.php?id=96053

    8.0.13 added _binary tags to blobs in the mysqldump output. However,
    memory allocated for the insert statement did not account of the 8 bytes
    of the "_binary " string properly. This resulted in mysqldump writing
    to memory beyond the buffer allocated for the string buffer before it
    is reallocated with a new larger size.

    The fix is to account for the 8 bytes of the "_binary " string during
    the realloc calculation.

Use case:

Bug fix in mysqldump, which we use for backing up the mysqld servers.

Repo: https://github.com/mysql/mysql-server

Patch on top of 8.0.17: https://github.com/mysql/mysql-server/commit/4869291f7ee

How to repeat:
See description

Suggested fix:
See contribution code attached
[25 Jan 2020 16:50] FBContrib Admin
Fix mysqldump handling of varbinary columns 
(*) This code is contributed under the Facebook agreement

Contribution: fb_patch_165.txt (text/plain), 3.11 KiB.

[7 Apr 2023 19:36] Omer Barnir
Fixed as part of fixing Bug#96053
Thanks for Facebook for the contribution