Bug #103790 | Contribution: Backport Bug#28949700: SUBOPTIMAL USE OF STRING::RESERVE() IN ... | ||
---|---|---|---|
Submitted: | 24 May 2021 14:01 | Modified: | 8 Jun 2021 22:07 |
Reporter: | OCA Admin (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: JSON | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[24 May 2021 14:01]
OCA Admin
[24 May 2021 14:01]
OCA Admin
Contribution submitted via Github - Backport Bug#28949700: SUBOPTIMAL USE OF STRING::RESERVE() IN WRAPPER_TO_STRING( (*) Contribution by Annirudh Prasad (Github annirudh, mysql-server/pull/336#issuecomment-846109878): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: git_patch_646089810.txt (text/plain), 6.23 KiB.
[24 May 2021 14:30]
MySQL Verification Team
Thank you for the contribution.
[8 Jun 2021 22:07]
Jon Stephens
Documented fix as follows in the MySQL 5.7.36 changelog: Conversion of JSON values to text caused linear growth of the destination string, resulting in an unnecessarily high number of reallocations. Now this process uses exponential growth instead, to reduce the number of allocations required. This fix originally appeared in MySQL 8.0 and was backported to MySQL 5.7 by Annirudh Prasad, whom we thank for the contribution. Closed.