Bug 669364 - mysql 5.5 doesn't honour $MYSQL_HOME
Summary: mysql 5.5 doesn't honour $MYSQL_HOME
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Tom Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 668602
TreeView+ depends on / blocked
 
Reported: 2011-01-13 13:43 UTC by Martin Kho
Modified: 2013-07-03 03:34 UTC (History)
5 users (show)

Fixed In Version: mysql-5.5.8-5.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-13 18:44:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Martin Kho 2011-01-13 13:43:38 UTC
Description of problem:
To use a specific place for the defaults -file my.cnf (say ~/<path-to-my-dir>) in combination with mysql embedded server one has two options (see also [1]):

1. Put the path into the sever_options variable and issue mysql_library_init(num_elements, server_options, server_groups)

2. Set the environment variable MYSQL_HOME before calling [2]
mysql_library_init(0, NULL, NULL)

The first option works as expected, the second doesn't. Amarok uses the second option, but it refuses to start because the server is using the global my.cnf in /etc. A workaround for this is to put the amarok specific parameters in ~/.my.cnf.

Why is the not working of the second option a bug IMHO? In the second option the initialisation of the server is done without any options. If you need some specialities you have to set them before the call to init. Setting MYSQL_HOME seems to be a good choice for this. There is however one sentence that's not clear to me and if it is relevant: "If you link this client against the normal mysqlclient library, this function [mysql_library_init()] is just a stub that does nothing."


[1] http://dev.mysql.com/doc/refman/5.5/en/libmysqld-example.html
[2] http://dev.mysql.com/doc/refman/5.5/en/option-files.html

Version-Release number of selected component (if applicable):
mysql-5.5.8-4.fc15.x86_64

How reproducible:
run amarok (tested version 2.3.90-x and 2.4.0-1) under KDE 4.6 RC2. Look in ~/.xsession-errors. There you'll see the following message.

mysql_embedded: Table 'mysql.plugin' doesn't exist
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.5
110113  9:35:15  InnoDB: Using Linux native AIO
110113  9:35:15  InnoDB: Initializing buffer pool, size = 128.0M
110113  9:35:15  InnoDB: Completed initialization of buffer pool
110113  9:35:15  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name /var/lib/mysql/ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
unnamed app(2226): Communication problem with  "amarok" , it probably crashed. 
Error message was:  "org.freedesktop.DBus.Error.ServiceUnknown" : " "The name org.kde.amarok was not provided by any .service files" "

Actual results:
mysql embedded server doesn't honour MYSQL_HOME

Expected results:
mysql embedded server honours MYSQL_HOME

Additional info:

Comment 1 Martin Kho 2011-01-13 13:53:31 UTC
Hi,

One more thing. The second option worked in the MySQL 5.1 series.

Martin Kho

Comment 2 Tom Lane 2011-01-13 17:35:12 UTC
Seems to be a dup of http://bugs.mysql.com/bug.php?id=59280

Comment 3 Tom Lane 2011-01-13 18:44:42 UTC
ok, give .5 a try

Comment 4 Martin Kho 2011-01-13 20:28:38 UTC
Hi Tom,

You've done a great job! Amarok is working again as it used to be. Please close this report.

Thanks,

Martin Kho

Comment 5 Martin Kho 2011-01-13 20:29:19 UTC
Hi,

I just saw you already closed this report :-)

Martin Kho


Note You need to log in before you can comment on or make changes to this bug.