Bug #57971 mysql_library_init() fails in Embedded server v5.5.6
Submitted: 4 Nov 2010 10:46 Modified: 15 Nov 2010 15:11
Reporter: cedric quilliot Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S2 (Serious)
Version:v5.5.6 OS:Microsoft Windows (2003 R2 or XP SP3)
Assigned to: Sergey Vojtovich CPU Architecture:Any
Tags: regression

[4 Nov 2010 10:46] cedric quilliot
I have a program working fine with MySQL v5.1.51 embedded server.
Then I tried to link it against MySQL v5.5.6 rc .

The program fails during library init : mysql_library_init() returns 1, and the error file contains :

InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
101029 15:20:56 InnoDB: highest supported file format is Barracuda.

When the init API is called, it lasts during 5 or 6 seconds, then fails (whereas in earlier releases it starts in less than a second).
The only arguments I pass to mysql_library_init() is the option "--defaults-file=mySql.ini", and my INI file contains only directives "basedir" and "datadir".

How to repeat:
Write a simple init code and link it against libmysqld.dll version 5.5.6, for example :

static char *g_pMySQLOptions[] = {

int g_nMySQLOptions = sizeof(g_pMySQLOptions) / sizeof(char *) - 1;

static char *g_pMySQLOptionGroups[] = {

int main(void)
if(mysql_library_init(g_nMySQLOptions, g_pMySQLOptions, (char **) g_pMySQLOptionGroups) != 0)
				printf("Error initializing MySQL Embedded");
				return FALSE;

///////////// Contents of mySql.ini :
#Path to installation directory. All paths are usually resolved relative to this.

#Path to the database root

[5 Nov 2010 2:24] MySQL Verification Team
Thank you for the bug report.
[11 Nov 2010 13:51] Sergey Vojtovich
In 5.5 there is no "default-character-set" option, thus server refuse to startup.
In 5.1 there is such option with remark that it is deprecated.

You may retrieve relevant error message using mysql_error(NULL).

Incompatible Change: The following obsolete constructs have been removed. Where alternatives are shown, applications should be updated to use them.
The --default-character-set and --default-collation server options (use --character-set-server and --collation-server).
[15 Nov 2010 13:54] cedric quilliot

Thank you very much for this information, now my application works.
However, please note that the documentation is a bit confusing since the option "default-character-set" is still valid for client programs, as mentioned here: 


It should be understood that only the _server_ part of the configuration file no longer accept this option.

Best regards,

[15 Nov 2010 15:11] Sergey Vojtovich
The page mentioned above lists _mysql_ command line tool options, not server options.

Server options are listed at:

It says explicitly: --default-character-set was removed in MySQL 5.5.3.