mysql and realpath on OpenBSD
MySQL has the ability to spread index and data files across multiple disks by
using symlinks (a bit of a hack, but whatever). The server needs to understand
that there are symlinks involved when repairing tables - it uses realpath() for
this.
Unfortunately on OpenBSD, the mysql code doesn't recognize that realpath is
there or working properly (I haven't dug far enough to discover exactly which).
The config code seems to try to test, so ... is the OpenBSD realpath "broken",
or the mysql config code, or ...
Thanks,
chris
Re: mysql and realpath on OpenBSD
On 15/09/2005 2:56 PM, Christopher A. Kantarjiev wrote:[color=blue]
> MySQL has the ability to spread index and data files across multiple
> disks by using symlinks (a bit of a hack, but whatever). The server
> needs to understand that there are symlinks involved when repairing
> tables - it uses realpath() for this.
>
> Unfortunately on OpenBSD, the mysql code doesn't recognize that realpath
> is there or working properly (I haven't dug far enough to discover
> exactly which). The config code seems to try to test, so ... is the
> OpenBSD realpath "broken", or the mysql config code, or ...
>[/color]
I don't know how you might get this, but ERRNO is set if realpath() fails.
According to the man page for realpath, the BSD implementation differs
from a classic Solaris implementation. Specifically, realpath() always
returns absolute paths, whereas Solaris can return a relative resolved
path when given a relative pathname. Perhaps MySQL is depending on this
behaviour.
Re: mysql and realpath on OpenBSD
Christopher A. Kantarjiev <cak@dimebank.com> wrote:
....[color=blue]
> The config code seems to try to test, so ... is the OpenBSD realpath "broken",
> or the mysql config code, or ...[/color]
.....
Last time I looked "realpath" worked OK. You'll need to check in the
config.log to found out why the test failed. Sometimes it has more to
do with config test progrs trying to load NX libs or hdr files than
doing the actual test.
Re: mysql and realpath on OpenBSD
Christopher A. Kantarjiev <cak@dimebank.com> wrote:[color=blue]
> MySQL has the ability to spread index and data files across multiple disks by
> using symlinks (a bit of a hack, but whatever). The server needs to understand
> that there are symlinks involved when repairing tables - it uses realpath() for
> this.[/color]
[color=blue]
> Unfortunately on OpenBSD, the mysql code doesn't recognize that realpath is
> there or working properly (I haven't dug far enough to discover exactly which).
> The config code seems to try to test, so ... is the OpenBSD realpath "broken",
> or the mysql config code, or ...[/color]
The changelog for 3.8 says that realpath was just now made thread-safe.
MySQL uses threads heavily, ergo....
Just a guess, though. MySQL has lots of stupid code.
Re: mysql and realpath on OpenBSD
Christopher A. Kantarjiev wrote:[color=blue]
> MySQL has the ability to spread index and data files across multiple
> disks by using symlinks (a bit of a hack, but whatever). The server
> needs to understand that there are symlinks involved when repairing
> tables - it uses realpath() for this.
>
> Unfortunately on OpenBSD, the mysql code doesn't recognize that realpath
> is there or working properly (I haven't dug far enough to discover
> exactly which). The config code seems to try to test, so ... is the
> OpenBSD realpath "broken", or the mysql config code, or ...
>
> Thanks,
> chris[/color]
did you try with hard links instead?
Re: mysql and realpath on OpenBSD
zarko bulatovic wrote:[color=blue]
> Christopher A. Kantarjiev wrote:
>[color=green]
>> MySQL has the ability to spread index and data files across multiple
>> disks by using symlinks (a bit of a hack, but whatever). The server
>> needs to understand that there are symlinks involved when repairing
>> tables - it uses realpath() for this.
>>
>> Unfortunately on OpenBSD, the mysql code doesn't recognize that
>> realpath is there or working properly (I haven't dug far enough to
>> discover exactly which). The config code seems to try to test, so ...
>> is the OpenBSD realpath "broken", or the mysql config code, or ...
>>
>> Thanks,
>> chris[/color]
>
>
> did you try with hard links instead?[/color]
Hard links aren't very interesting when the point is to move the files onto
another physical disk.
Re: mysql and realpath on OpenBSD
Chris Kantarjiev wrote:[color=blue]
> zarko bulatovic wrote:
>[color=green]
>> Christopher A. Kantarjiev wrote:
>>[color=darkred]
>>> MySQL has the ability to spread index and data files across multiple
>>> disks by using symlinks (a bit of a hack, but whatever). The server
>>> needs to understand that there are symlinks involved when repairing
>>> tables - it uses realpath() for this.
>>>
>>> Unfortunately on OpenBSD, the mysql code doesn't recognize that
>>> realpath is there or working properly (I haven't dug far enough to
>>> discover exactly which). The config code seems to try to test, so ...
>>> is the OpenBSD realpath "broken", or the mysql config code, or ...
>>>
>>> Thanks,
>>> chris[/color]
>>
>>
>>
>> did you try with hard links instead?[/color]
>
>
> Hard links aren't very interesting when the point is to move the files
> onto another physical disk.[/color]
yes...my error. i didnt see that he wants files to be on anhoter disk.