Bug #30129 mysql_install_db appears to run normally, but the databases are not created
Submitted: 30 Jul 2007 20:45 Modified: 21 Oct 2008 17:37
Reporter: Lee Obringer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S1 (Critical)
Version:5.0.45, 5.1.21 OS:Novell NetWare
Assigned to: Chad MILLER CPU Architecture:Any
Tags: unscheduled

[30 Jul 2007 20:45] Lee Obringer
Description:
After installing version 5.0.45 of MySQL on a Novell Netware file server with Netware 6.5 SP 5 installed I try to run the mysql_install_db and it exits normally indicating that the databases have been created, but no new database files are created in the SYS:mysql\data directory.

No errors are logged.

How to repeat:
Install (copy) MySQL 5.0.45 then try to run mysql_install_db.  

Suggested fix:
I tried running the mysql_install_db.nlm from the previous version of MySQL and it created new databases.  I'm just not sure if they are current or not.
[6 Aug 2007 9:01] MySQL Verification Team
I wonder if the init_db.sql and test_db.sql are missing. Checking now.
[24 Aug 2007 17:49] Michael Bell
I can confirm these 2 files are missing in the bin directory. Having someone test if the ones from 5.0.27 (which is I think the previous community server release on netware) placed in the bin directory fix the issue.
[7 Sep 2007 3:43] Michael Bell
Although Shane Bester appears to have fallen on a rock when he tried to look for the files, indeed it DOES work to use the previous community server version's sql files.
[28 Sep 2007 18:09] Michael Bell
Files taken from 5.0.27 netware bin directory

Attachment: missingfiles.zip (application/zip, text), 7.15 KiB.

[28 Sep 2007 18:12] MySQL Verification Team
this is verified since I tested the 5.0.45 binaries.
csc 10143, note 76 contains details.
[8 Dec 2007 4:26] Guenter K
new mysql_install_db.nlm

Attachment: mysql_install_db.zip (application/zip, text), 4.42 KiB.

[8 Dec 2007 4:27] Guenter K
Hi,
I think since the mysql_install_db.nlm can also take an option for the *.sql script it should in any case be tested if it can be accessed.
The current the mysql_install_db.nlm instead does report success with creating databases although nothing was created!
I did a quick hack to the source and patched mysql_install_db.c to error out if the sql script was not not:

--- mysql_install_db.c.orig	Thu Nov 15 15:06:52 2007
+++ mysql_install_db.c	Sat Dec 08 04:49:36 2007
@@ -363,6 +363,15 @@
 	add_arg(&al, "--skip-innodb");
 	add_arg(&al, "--skip-bdb");
 
+  if ((err = stat(sql_file, &info)) != 0)
+  {
+    printf("ERROR - %s:\n", strerror(errno));
+    printf("\t%s\n\n", sql_file);
+    // free args
+    free_args(&al);
+    exit(-1);
+  }
+
   // spawn mysqld
   err = spawn(mysqld, &al, TRUE, sql_file, out_log, err_log);
 
I've also attached the new NLM for others to try.
[18 Dec 2007 15:08] Trudy Pelzer
The comments on this bug indicate the problem is not
only found on Netware. Restoring I1.

Danny: Please note that the triage guidelines do not
allow for leads to change triage values. If you disagree
with a decision, you may ask for it to be reconsidered
but you may not simply change triage values.
[2 Aug 2008 5:58] MySQL Verification Team
bug #38525 was marked as a duplicate of this.
[6 Aug 2008 13:31] 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/51002

2650 Chad MILLER	2008-08-06
      Bug#30129: mysql_install_db appears to run normally, but the databases \
      	are not created  {Netware}
      
      The init and test sql files were not created at cross-compilation time.
      
      Now, make them in the default build rule.  Additionally, remove the "fix" 
      SQL instructions, which are unnecessary for newly initialized databases.
      Also, clean up the english in an error message, and BZRify nwbootstrap.
[8 Aug 2008 17:40] Magnus BlÄudd
Good job, patch looks fine and we should finally get rid of the "init_db.sql" does not exist in netware package problem since you have added double checks they are now created.
[18 Aug 2008 15:31] Chad MILLER
Queued to 5.0-bugteam, 5.1-bugteam, and 6.0-bugteam.
[21 Aug 2008 18:13] Bugs System
Pushed into 5.1.28  (revid:chad@mysql.com-20080806132503-7nlk40nfondnv116) (version source revid:sergefp@mysql.com-20080819132519-eimtstp3bx89ya9d) (pib:3)
[27 Aug 2008 1:57] Paul DuBois
Noted in 5.1.28 changelog.

On NetWare, mysql_install_db could appear to execute normally even if
it failed to create the initial databases.

Setting report to NDI pending push into 5.0.x, 6.0.x.
[12 Sep 2008 1:44] 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/53909

2682 He Zhenxing	2008-09-12 [merge]
      Auto merge
      Update plugin.h.pp for WL#4398
[13 Sep 2008 22:16] Bugs System
Pushed into 6.0.6-alpha  (revid:chad@mysql.com-20080806132503-7nlk40nfondnv116) (version source revid:hakan@mysql.com-20080716105246-eg0utbybp122n2w9) (pib:3)
[16 Sep 2008 4:40] Paul DuBois
Noted in 6.0.6 changelog.

Setting report to NDI pending push into 5.0.x.
[30 Sep 2008 13:26] 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/54774

2667 He Zhenxing	2008-09-29 [merge]
      Auto Merge
[21 Oct 2008 15:07] Chad MILLER
This is in v5.0.68.

$ cd 5.0; bzr log -m30129
[21 Oct 2008 17:37] Paul DuBois
Noted in 5.0.68 changelog.
[13 May 2011 21:29] cesar diez-canseco
Thanks to everyone  for your posts i read them and now  can install mysql in a netware 6.5!

Cesar