Bug #16243 support for one-instance startup exclusive lock
Submitted: 6 Jan 2006 3:50
Reporter: xuefer tinys Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.1 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[6 Jan 2006 3:50] xuefer tinys
Description:
it's nice we have skip-external-locking. but there's 0.001% chance (by mistake, by bad init.d script) which lead to 50% data lost.
so why not make a one-instance exclusive locking which force mysql itself refuse to startup if a lock-file is locked, which mean a mysql is already started up, no matter it's working or freezed, in specified data-dir.
and tools such as myisamchk should check this lock to avoid "fixing" index by mistake

How to repeat:
1. start mysqld with skip-external-locking
2. run myisamchk on same data-dir

or
1. start mysqld with skip-external-locking
2. run mysqld again on same data-dir by mistake (u've lost pid file or just haven't killed all mysqld childs)

stupid but destroy data before you cry