Review Request: mysql embedded default options

Jeff Mitchell mitchell at kde.org
Sun Mar 6 07:31:02 CET 2011



> On Jan. 11, 2011, 5 a.m., Ian Monroe wrote:
> > The current way we do it is because if you have a MySQL that randomly doesn't support whatever argument you are trying to use, Bad Things Happen. If you look at the history of this code it is quite turbulent. 
> > 
> > Surely there is a place that is writable that we could use instead?
> > 
> > Granted your solution only uses one argument so its probably fine. But in general it would be better to find a solution that doesn't alter the logic here.
> 
> Ian Monroe wrote:
>     Well rereading your description I see this is because it "doesn't reliably" find the config file. I guess that sounds like the mysql embedded that I know. 
>     
>     Still seems like a step backward to use the arguments again though... the whole reason we use a config file in the first place is to avoid using arguments.
> 
> Jeff Mitchell wrote:
>     Indeed -- the reason we went to environment variables in the first place was because --defaults-file didn't always work. I discussed this problem with Monty at OSCON and worked with the Maria/MySQL guys and they couldn't figure out a good solution, so they pointed me to the environment variable route.
>     
>     I know Windows supports environment variables, is there a way to make the functionality work while keeping this method?
>     
>     Otherwise, maybe we can use defines to use one method or the other.
>
> 
> Ian Monroe wrote:
>     It looks like the environmental variable thing isn't working on mysql 5.5.9. 
>     
>     Is 5.5.x perhaps the version you were using Patrick? It might just be that windows people noticed it first if they upgraded mysql first... (linux distros are really conservative when it comes to upgrading mysql).
> 
> Ian Monroe wrote:
>     well nevermind, I tried a variation of your fix and I still have a problem with linux + 5.5.9.
> 
> Ian Monroe wrote:
>     nevermind my nevermind. :)
>     
>     it did "work", where work means mysql still doesn't work but it doesn't crash immediately with a permission problem. my WIP is in eean-mysql5.5.9fix

The MYSQL_HOME thing is a confirmed MySQL 5.5 bug -- basically, they simply forgot about that environment variable. The right way to fix that would be to get packagers to patch MySQL. See http://bugs.mysql.com/bug.php?id=59280 and https://bugzilla.redhat.com/show_bug.cgi?id=669364


- Jeff


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100345/#review829
-----------------------------------------------------------


On Jan. 10, 2011, 11:44 a.m., Patrick Spendrin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100345/
> -----------------------------------------------------------
> 
> (Updated Jan. 10, 2011, 11:44 a.m.)
> 
> 
> Review request for Amarok.
> 
> 
> Summary
> -------
> 
> The mysql embedded library doesn't reliably find the config file on Windows, instead it tries to write into the write-protected install location. This patch uses the mysql API instead of setenv and should work on all platforms. It shouldn't change the current behaviour, when you test please still backup your .kde/share/apps/amarok/mysqle database directory before trying.
> 
> 
> Diffs
> -----
> 
>   src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp 4e8088d 
> 
> Diff: http://git.reviewboard.kde.org/r/100345/diff
> 
> 
> Testing
> -------
> 
> on Microsoft Visual Studio 2010 EE (msvc2010) it works as expected.
> 
> 
> Thanks,
> 
> Patrick
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20110306/d04d2d63/attachment.htm 


More information about the Amarok-devel mailing list