Bug #43408 | "Forcing shutdown of 1 plugins" overrides actual error message in libmysqld | ||
---|---|---|---|
Submitted: | 5 Mar 2009 11:01 | Modified: | 5 Mar 2009 11:31 |
Reporter: | Hartmut Holzgraefe | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Embedded Library ( libmysqld ) | Severity: | S3 (Non-critical) |
Version: | mysql-5.1.31 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[5 Mar 2009 11:01]
Hartmut Holzgraefe
[5 Mar 2009 11:28]
Hartmut Holzgraefe
The following simple test program can be used to reproduce the problem. When linked against a MySQL 4.1 embedded server library it terminates with 090305 12:25:14 [ERROR] mysql_embedded: unknown option '--foobar' but when linked against MySQL 5.1 libmysqld it reports Error initializing the server: 2000 Forcing shutdown of 3 plugins (the number of plugins may vary depending on server compile options) #include <stdlib.h> #include <stdio.h> #include <mysql.h> static char *server_options[] = { "mysql_test", "--foobar", NULL}; int num_elements = (sizeof(server_options)/ sizeof(char *)) - 1; static char *server_groups[] = { "libmysqld_server", "libmysqld_client", NULL}; int main(void) { if(mysql_library_init(num_elements, server_options, server_groups)) { fprintf(stderr, "Error initializing the server: %d %s\n", mysql_errno(NULL), mysql_error(NULL)); exit(1); } printf("Initialized the server\n"); mysql_server_end(); return 0; }
[17 Dec 2010 9:55]
Hartmut Holzgraefe
With 5.5 the error message now is Error initializing the server: 2000 mysql_embedded: Shutdown complete so at least a little less confusing than the "Forcing shutdown of $x plugins" one, but still the real error message seems to be overwritten .... :(