From: Michael Widenius Date: April 3 1999 10:52am Subject: How enable symlink-aware behavior? List-Archive: http://lists.mysql.com/mysql/1368 Message-Id: <14085.62065.391117.526786@monty.pp.sci.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>>>> "Scott" == Scott Weikart 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