I understand all of the reasons given by Alexander. Yet I think that in 99% of cases, it would be best for myisamchk to do as Mark suggest, and not run when a MySQL server is active. Safety would be the default. There could be a special option (--no-safety) for myisamchk to override that check.
----- Original Message ----- From: "Alexander Keremidarski" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Thursday, May 23, 2002 1:54 AM Subject: Re: Locking TABLES for myisamchk, please help!! > Mark wrote: > > Wednesday, May 22, 2002, 9:23:02 AM, louie wrote: > <cut> > > > Personally, I find the behavior of myisasmchk to be a bit "beta" when it > > comes live tables. It would be real easy for myisasmchk to refuse to run > > when mysqld is running. That should be a built-in precaution. I can > > understand possible objections to myisasmchk globally locking tables > > out of the blue (it might disrupt what some clients are doing), but if > > myisamchk cannot run on a live table, it should not run on a live table. > > As simple as that. > > Hi, > It is not that simple. > > You can run several mysqld simultaneously. So checking if mysqld is > running is not enough. > > Or you might wish to use myisamchk knowing in advance that mysqld will > not write to table. > > Typical case is to check 'offline' database or table. Backup copy for > example. > > Another case: You want to check table which is read-only for all mysql > users and for some reason (different priority, buffers used etc.) you > don't want to do it with REPAIR TABLE. > > myisamchk uses tables as files so it is admin responcibility to avoid > problems. It is dangerous to use it but it is possible. > > You can compare it to filesystem checks. It is admin to decide if he can > handle it with live server or not. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php