Bug #20721 mysql_install_db first line is blank
Submitted: 27 Jun 2006 13:11 Modified: 2 Aug 2006 17:57
Reporter: Filippo Carletti Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1-BK, 5.0-BK, 4.1.21-BK, 4.1.20 OS:Linux (linux)
Assigned to: Iggy Galarza CPU Architecture:Any

[27 Jun 2006 13:11] Filippo Carletti
Description:
The first line of mysql_install_db is empty. It should not be present.
bash has no problem discovering it's a shell script, but, the one I found, djb daemontools setuidgid complains with an exec format error.

The workaround is to call it as "sh mysql_install_db", but documentation states:
bin/mysql_install_db --user=mysql

How to repeat:
Execute:
setuidgid bin/mysql_install_db

Suggested fix:
Delete first line of mysql_install_db
[27 Jun 2006 13:18] Valeriy Kravchuk
Thank you for a bug report. Indeed, first line is blank:

openxs@suse:~/dbs/4.1> head bin/mysql_install_db

#!/bin/sh
# Copyright (C) 2002-2003 MySQL AB
# For a more info consult the file COPYRIGHT distributed with this file.

# This scripts creates the privilege tables db, host, user, tables_priv,
# columns_priv in the mysql database, as well as the func table.
#
# All unrecognized arguments to this script are passed to mysqld.

And not only in 4.1.20, but in current sources of 5.1, 5.0 and 4.1 as well.
[14 Jul 2006 19:22] 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/9180
[14 Jul 2006 21:48] Timothy Smith
Patch is fine.
[31 Jul 2006 11:08] Magnus BlÄudd
Looks OK
[2 Aug 2006 17:57] Paul Dubois
Noted in 4.1.22 changelog.
[10 Aug 2006 14:56] Chad MILLER
Added to 5.0.25 .