List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:April 3 1999 10:52am
Subject:How enable symlink-aware behavior?
View as plain text  
>>>>> "Scott" == Scott Weikart <scott@stripped> writes:

Scott> mysql-3.22.20a, mysql.info, node "Symbolic links", says
Scott>    Using symbolic links for databases and tables
Scott>    =============================================

Scott>    ...

Scott>    *MySQL* doesn't support linking of databases by default.  Things will
Scott>    work fine as long as you don't make a symbolic link between databases.
Scott>    Suppose you have a database `db1' under the *MySQL* data directory, and
Scott>    then make a symlink `db2' that points to `db1':

shell> cd /path/to/datadir
shell> ln -s db1 db2

Scott>    Now, for any table `tbl_a' in `db1', there also appears to be a table
Scott>    `tbl_a' in `db2'.  If one thread updates `db1.tbl_a' and another thread
Scott>    updates `db2.tbl_a', there will be problems.

Scott>    If you really need this, you must change the following code in
Scott>    `mysys/mf_format.c':

Scott> 	if (!lstat(to,&stat_buff))  /* Check if it's a symbolic link */
Scott> 	    if (S_ISLNK(stat_buff.st_mode) && realpath(to,buff))

Scott>    Change the code to this:

Scott> 	if (realpath(to,buff))

Scott> But I see in mf_format.c that flag bit 32 will get the second (symlink-aware)
Scott> behavior.  How do I set this flag bit?

Scott> -scott

Hi!

The 32 bit is automaticly set in MySQL 3.22.20 (Starting from
3.22.19);  This means that the old restrictions of linking databases
should be solved.

Regards,
Monty
Thread
How enable symlink-aware behavior?Scott Weikart3 Apr
  • How enable symlink-aware behavior?Michael Widenius3 Apr
  • PHP and mysql_result Need to reference the record I just insertedVan9 May
    • RE: PHP and mysql_result Need to reference the record I just insDon Read10 May
      • Re: PHP and mysql_result Need to reference the record I just insVan10 May