Bug #108652 Contribution: Moving a local object in a return statement prevents copy eli ...
Submitted: 29 Sep 2022 14:55 Modified: 13 Oct 2022 18:35
Reporter: OCA Admin (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / C++ Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[29 Sep 2022 14:55] OCA Admin
Description:
This bug tracks a contribution by Octavio Valle (Github user: Dwordcito) as described in http://github.com/mysql/mysql-connector-cpp/pull/31

How to repeat:
See description

Suggested fix:
See contribution code attached
[29 Sep 2022 14:55] OCA Admin
Contribution submitted via Github - Moving a local object in a return statement prevents copy elision. 
(*) Contribution by Octavio Valle (Github Dwordcito, mysql-connector-cpp/pull/31#issuecomment-1261528606): 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_1063659133.txt (text/plain), 993 bytes.

[29 Sep 2022 15:25] MySQL Verification Team
Hello Octavio Valle,

Thank you for the report and contribution.

regards,
Umesh
[13 Oct 2022 18:35] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/C++ 8.0.32 release, and here's the proposed changelog entry from the documentation team:

A local object move in a return statement could prevent copy elision (or
copy omission). Our thanks to Octavio Valle for the patch.

Thank you for the bug report.