4 messages in com.mysql.lists.bugsRe: MYSQL structure, LIBMYSQL.DLL and...
FromSent OnAttachments
Agus Setiono14 Jan 2001 09:29 
Thimble Smith14 Jan 2001 09:40 
Miguel Angel Solórzano14 Jan 2001 20:49 
Michael Widenius15 Jan 2001 06:38 
Subject:Re: MYSQL structure, LIBMYSQL.DLL and mysql_init()
From:Michael Widenius (mon@mysql.com)
Date:01/15/2001 06:38:59 AM
List:com.mysql.lists.bugs

hi!

"miguel" == miguel <Angel =?iso-8859-1?Q?Sol=F3rzano?= <mig@mysql.com>>
writes:

miguel> At 09:30 14/01/2001 -0800, Agus Setiono wrote: miguel> Hi!

miguel> That isn't a bug, it's an incompatibility in the use of miguel> a DLL built with a Microsoft compiler VC++ 6.0 with a miguel> Borland compiler. Those problems are well known.

miguel> If you want to use MySQL C API, you should use the miguel> static libraries 3.23.27 that you found in our Win32 page, miguel> which were compiled with a Borland compiler.

miguel> Regards, miguel> Miguel

I use libmysql.dll that comes with MySQL 3.23.27 beta debug on Windows 98 system.

Everytime I pass a pointer of MYSQL structure variable to function mysql_init(MYSQL*), it initializes 12 bytes more than the size of the structure. What happened?

My BC++ 5.02 compiler tells me that the MYSQL structure has a size of 484 bytes. What could be the 12 bytes field member(s)? Does it have anything to do with struct member field alignment?

Another way to fix this is to not allocate the MYSQL struct yourself but let mysql_init() do it for you!

Regards, Monty