Bug #33147 mysql_library_init() ignores argv/argc in non-embedded
Submitted: 11 Dec 2007 18:30
Reporter: Sergei Golubchik 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
Triage: D5 (Feature request)

[11 Dec 2007 18:30] Sergei Golubchik
Description:
The C-API is supposed to be the same for the embedded and client-server libraries.
But the very first function to use mysql_library_init(argc, argv, groups) ignores its arguments in the client-server library, but uses in embedded.

This creates an asymmetry that complicates writing programs that could be linked with both libraries.

How to repeat:
.

Suggested fix:
create a function mysql_read_default_options_from_argv_argc_groups(). Move most of mysql_read_default_options() into it. Call it from both mysql_server_init() (in non-embedded case) and from mysql_read_default_options(). In the mysql_server_init() it'll store the options in the static struct st_mysql_options.