List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:June 14 2001 3:39pm
Subject:Embedded server in 4.0
View as plain text  
Hi!

Here is some additional comments to Sashas.


>>>>> "John" == John Birrell <jb@stripped> writes:

John> G'day,
John> I have a few questions about the embedded server stuff
John> in the 4.0 tree. I'm working on an evaluation application
John> that uses an Apache module which would suit an embedded
John> mysql engine. I know that 4.0 is still under development,
John> just like the Apache stuff I'm using.

John> Some things I noticed about the sources:

John> 1. The --enable-threaded-client configure argument
John>    doesn't build a threaded version of 'mysql', at
John>    least not on FreeBSD. The makefile defines
John>    UNDEF_THREADS_HACK. This looks like it applies
John>    to all platforms.

Yes, the default mysql clients are never threaded (as they don't use
threads), but the client libraries should be threaded.

John> 2. With the --with-embedded-server configuration
John>    argument, libmysqlclient and libmysqld get
John>    built. The 'mysql' application links against
John>    libmysqlclient, but this contains the
John>    version of mysql_real_connect that expects to
John>    connect to the server via a socket. The
John>    mysql_real_connect in libmysqld doesn't get
John>    called. This doesn't seem right to me.

Even when building the embedded server version 'mysql' should be
linked with libmysqlclient.

When doesn't mysql_real_connect in libmysqld get called?

John> 3. The libmysqld/lib_vio.c source appears to
John>    need vio_poll_read() to be implemented or at
John>    least exist. I find it is an unresolved
John>    external when I try to build a version of
John>    mysql linking against libmysqld before
John>    libmysqlclient to get the embedded version
John>    of mysql_real_connect.

You should never link with both libmysqld and libmysqlclient.

Tõnu did a couple of days ago a push of some new lib_vio.c code and it
may be that he broke something;  I will look at this today and if this
is still the case, I will fix this.

John> 4. When linking mysql against libmysqld, I
John>    find that the sql_alloc and sql_element_free
John>    functions in client/mysql.cc clash with those
John>    in libmysqld. I'm not sure how this is
John>    supposed to be resolved.

This is because we have never fixed that 'mysql' should be linked with
the embedded version. The fix would probably be to add some defines to
redefine sql_alloc() and sql_element_free() in mysql.cc

Tim will probably look at this soon.

John> 5. The fact that libmysqlclient and libmysqld
John>    have functions of the same name is a problem
John>    to me. I need to use shared library versions
John>    of these so that my application doesn't fall
John>    under the GPL. Is there any chance that the
John>    licence can be set to the LGPL for the 
John>    embedded libraries?

The function names are not a problem, because you should never link
with both libraries.

The embedded library will be continue to be GPL because we need the
revenue from the embedded library to be able to continue with MySQL
development.  Commercial application vendors that doesn't want to make
their license GPL compatible, can always license the embedded library
from us under a different license.

John> I haven't used MySQL for long, so these points
John> my be naiive. Sorry in advance if that's the
John> case. 8-)

Regards,
Monty
Thread
Embedded server in 4.0John Birrell14 Jun
  • Re: Embedded server in 4.0Sasha Pachev14 Jun
    • Re: Embedded server in 4.0John Birrell14 Jun
  • Embedded server in 4.0Michael Widenius14 Jun
Re: Embedded server in 4.0Michael Widenius17 Jun
  • Re: Embedded server in 4.0John Birrell17 Jun
    • Re: Embedded server in 4.0Michael Widenius18 Jun