Bug #83573 Add missing const qualifiers
Submitted: 27 Oct 2016 11:05 Modified: 2 Nov 2016 16:15
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:8.0.1 OS:Any
Assigned to: CPU Architecture:Any

[27 Oct 2016 11:05] Marko Mäkelä
Description:
Several Item member functions are declaring parameters as non-const, although they could be const. Also some string parameters could be passed as const to various functions.

How to repeat:
See below.

Suggested fix:
String::charpos(), String::strstr(), String::strrstr(),
JSon_wrapper::clone_dom(), Item::clone_item(),
Item_row::illegal_method_call(), Item_cache_row::illegal_method_call(),
Item::is_result_field(), Item::is_bool_func(), Item::is_splocal(),
Item::compare_collation(), Item::charset_for_protocol(),
Item::cols(), Item_func_inet_bool_base::calc_value(): Add const qualifier.

check_if_only_end_space(), double_from_string_with_check(),
longlong_from_string_with_check(): Make all parameters pointers to const.

Item_int::Item_int(const Item_int *),
ErrConvString::ErrConvString(const String *): Take a pointer to const.
[2 Nov 2016 16:15] Paul DuBois
Posted by developer:
 
Fixed in 8.0.1.

Code cleanup. No changelog entry needed.