Bug #16513 mysql_set_server_option not present in libmysqld.lib/exp
Submitted: 15 Jan 2006 9:26 Modified: 13 Sep 2006 2:25
Reporter: Wil Li Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S3 (Non-critical)
Version:5.0.18 OS:Windows (Windows)
Assigned to: Alexey Botchkov CPU Architecture:Any

[15 Jan 2006 9:26] Wil Li
Description:
Calling "mysql_set_server_option" using the embedded server library will result to a linker error because its definition is missing from libmysqld.lib/exp. The documentation didn't state that it cannot be called using the embedded server library, moreover it is defined in libmysql.c which is included in the libmysqld project.

There may be more missing definitions missing....

How to repeat:
Use libmysqld.lib/exp and call mysql_set_server_option, it will result to a linker error.

Suggested fix:
Add "mysql_set_server_option" (without quotes) in libmysqld.def. (same goes for other missing stuff) or use DUMPBIN to generate exports, or use makedef (http://www.codeguru.com/tools/standalonetools/article.php/c1351__1#more) to automatically generate .def files or turn the STDCALL define from this:

/* This was  _System _Export but caused a lot of warnings on _AIX43 */
#define STDCALL
#elif !defined( STDCALL)
#define STDCALL
#endif

to something like this:

#ifdef STDCALL
#ifdef _WIN32
#ifdef EMBEDDED_LIBRARY
#define STDCALL __declspec(dllexport)
#else
#define STDCALL __declspec(dllimport)
#endif
#endif
#define STDCALL
#endif
[25 Jul 2006 13:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/9537
[7 Aug 2006 7:40] Alexander Barkov
Ok to push.
[19 Aug 2006 9:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/10645

ChangeSet@1.2240, 2006-08-19 15:15:36+05:00, holyfoot@mysql.com +1 -0
  bug #16513 (no mysql_set_server_option in libmysqld.dll export)
[30 Aug 2006 13:12] Reggie Burnett
pushed to 5.0.25.  not yet pushed to 5.1
[30 Aug 2006 19:51] Paul DuBois
Noted in 5.0.25 changelog.

Setting report back to NDI pending push into 5.1.x.
[12 Sep 2006 14:25] Reggie Burnett
pushed into 5.1.12
[13 Sep 2006 2:25] Paul DuBois
Noted in 5.1.12 changelog.