Bug #27783 mysql_install_db should be able to install again, preserving existing files.
Submitted: 12 Apr 2007 13:16 Modified: 1 May 2007 17:41
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S1 (Critical)
Version:5.0 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[12 Apr 2007 13:16] Magnus Blåudd
Description:
It should be possible to run mysql_install_db a second time in the same location. It shall then create any missing system tables and populate the newly created system tables with initial data.

How to repeat:
To fix BUG#27022 a check as introduced in mysql_install_db that would cause it to abort with error message if a second install was performed. That check should be removed and we should detect it mysql.user or mysql.db didn't already exist. If they didn't exist they shoudl be filled with initial data.
[12 Apr 2007 15:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/24395

ChangeSet@1.2452, 2007-04-12 17:48:28+02:00, msvensson@pilot.blaudden +3 -0
  Bug#27783 mysql_install_db should be able to install again, preserving existing files.
   - Allow mysql_install_db to be run a second time in the same
     datadir to create and fill any missing system tables
[17 Apr 2007 13:20] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/24649

ChangeSet@1.2460, 2007-04-17 15:20:48+02:00, kent@mysql.com +3 -0
  Bug#27783 mysql_install_db should be able to install again, preserving existing files.
   - Allow mysql_install_db to be run a second time in the same
     datadir to create and fill any missing system tables
[26 Apr 2007 11:34] Bugs System
Pushed into 5.0.42
[26 Apr 2007 11:36] Bugs System
Pushed into 5.1.18-beta
[27 Apr 2007 9:21] Bugs System
Pushed into 5.1.18-beta
[27 Apr 2007 9:23] Bugs System
Pushed into 5.0.42
[1 May 2007 17:41] Paul DuBois
Noted in 5.0.42, 5.1.18 changelogs.

mysql_install_db is supposed to detect existing system tables and
create only those that do not exist. Instead, it was exiting with an
error if tables already existed.