Hi,
here in Virgo we have the following specific Tango deployment:
Out of this setup rises the need to be able to run the same shared DataBaseds executable providing to it the name of a diffrent mysql database to connect to.
At the moment the database name is defined at "configure" time and the DataBaseds executable is bound to it.
We are then making a change request for allowing to pass the database name at run time to DataBaseds.
We have already made a possible implementation of such change request by introducing an environment variable MYSQL_DATABASE. We attach to this change request the corresponding patch file.
We have made few tests with this modified DataBaseds, running two instances of it pointing to two diffrent remote mysql databases and we have encountered no problem so far.
Thanks a lot
Franco, Giovanni and Luca
Hello guys,
Thank's very much for the patch. I have applied it in the database and TAC server trunk. It will be part of next distrib. Note that I have applied a modified patch in order to get MYSQL_DATABASE value from a real environment variable or from the /etc/tangorc file (for Linux).
Have a nice week-end
Emmanuel
How!
Thanks to you, Emmanuel, for your amazingly fast feedack.
And, sure, having MYSQL_DATABASE also set into /etc/tangorc is a good plus.
Cheers,
Franco
The database name results to be still hard-coded in a procedure call in:
http://sourceforge.net/p/tango-cs/code/HEAD/tree/classes/cpp/dbase/trunk/DataBase.cpp#l7182
and this is preventing to use arbitrary database name, other than "tango", properly.
I've found "tango" hard-coded also in
https://sourceforge.net/p/tango-cs/code/HEAD/tree/classes/cpp/dbase/trunk/create_db.sql.in
at line 56, and twice in
https://sourceforge.net/p/tango-cs/code/HEAD/tree/classes/cpp/dbase/trunk/stored_proc.sql.in
and
I'm not sure these are the only occurrences. Cheers,
Giovanni