Bug #51430 Use const char* instead of char*

Submitted: 23 Feb 2010 17:34 Modified: 25 Nov 2010 10:52
Reporter: Olaf van der Spek (Basic Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S4 (Feature request)
Version:* OS:Any
Assigned to: CPU Architecture:Any
Tags: qc

[23 Feb 2010 17:34] Olaf van der Spek
Description:
> int mysql_library_init(int argc, char **argv, char **groups)

Could const char* be used instead of char*? I assume the function isn't modifying the input arguments.
Not using const is troublesome for C++ callers.

How to repeat:
-
[25 Nov 2010 10:52] Valeriy Kravchuk
Manual (http://dev.mysql.com/doc/refman/5.1/en/mysql-library-init.html) says:

"mysql_library_init() makes a copy of the arguments so it is safe to destroy argv or groups after the call."

So, why not...

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.