Bug #92271 Make string constructor explicit
Submitted: 3 Sep 2018 8:29 Modified: 3 Sep 2018 17:07
Reporter: Steinar Gunderson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.14 OS:Any
Assigned to: CPU Architecture:Any

[3 Sep 2018 8:29] Steinar Gunderson
Description:
The String class has an implicit constructor from size_t. This causes confusion, as it's possible to do things like

  str = 'c';

which, surprisingly, means to create a 99-character string (the ASCII value of 'c') with undefined contents.

How to repeat:
N/A

Suggested fix:
Mark the constructor in question as explicit.
[3 Sep 2018 17:07] Paul DuBois
Posted by developer:
 
Fixed in 8.0.14.

Code cleanup. No changelog entry needed.