[fpc-devel] Call initialisation of library automatically in unit-initialization?

Joost van der Sluis joost at cnoc.nl
Wed Dec 3 14:18:36 CET 2008


Op woensdag 03-12-2008 om 13:09 uur [tijdzone +0100], schreef Michael
Van Canneyt:
> 
> On Wed, 3 Dec 2008, Joost van der Sluis wrote:
> 
> > When you use the MySQL client, you have to call myslq_library_init to
> > initialise the library, and mysql_library_end to de-initialize it again.
> > 
> > When the library is dynamically loaded using mysqlXXdyn.pp, shall I call
> > these functions automatically? Or should we leave it to the programmer?
> > (I'm in favour of doing it automatically)
> 
> Are there any options to these calls ?
> 
> If there are, it is a no, I think ?

Didn't thought about that. And yes, there are options. They are in
practice only used with the embedded-mysql version. And iven in that
case I guess they are rarely used: 

"The argc and argv arguments are analogous to the arguments to main(),
and enable passing of options to the embedded server. For convenience,
argc may be 0 (zero) if there are no command-line arguments for the
server. This is the usual case for applications intended for use only as
regular (non-embedded) clients, and the call typically is written as
mysql_library_init(0, NULL, NULL)."

So, what to do?

Joost.




More information about the fpc-devel mailing list