List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:June 17 2001 10:08pm
Subject:Re: Embedded server in 4.0
View as plain text  
Hi!

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

John> On Fri, Jun 15, 2001 at 04:22:33PM +0300, Michael Widenius wrote:
>> The intention is to have a call 'mysql_server_init(int argc, char **argv)'
>> that one can use to give all MySQL startup parameters. This call will
>> be no-op in the client/server version.

John> It just occurred to me that there might be a limitation here.
John> With the client/server implementation, a client can open
John> connections to a number of databases, each possibly
John> stored in a different location. With the embedded server
John> implementation, the server code uses one set of global
John> variables, so it isn't possible to get connections to
John> databases in different locations. Connections to
John> multiple databases looks like it's possible, but the
John> databases are all in the same parent directory.

John> Is it possible to do anything about this design?
John> For my application, I'd really like to be able to
John> put the databases in different parent directories.
John> I have other information that the application will
John> write to the same parent directory. To clean up
John> one set, I was just going to recursively remove
John> the whole directory.

First a question:

When you have an embedded server, why would you really care where the
data is?
What is the reason in using different parent directories ?
Do you need this on windows or Unix?
At least on Unix I think it would be better to have a base-parent
directory and from this use symbolic links to the different database
directories.  The benefit of this is that it would be much easier to
use standard scripts (like a backup script) to access the different
files than if they are spread without control all over the place.

In theory, the above is trivial to achieve by just setting
'mysql_data_home' to point to the different base 'data' directories
between calls, but I don't know if this is worth it.

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