mysql and realpath on OpenBSD - BSD

This is a discussion on mysql and realpath on OpenBSD - BSD ; 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() ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: mysql and realpath on OpenBSD

  1. 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

  2. Re: mysql and realpath on OpenBSD

    On 15/09/2005 2:56 PM, Christopher A. Kantarjiev wrote:
    > 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 ...
    >

    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.

  3. Re: mysql and realpath on OpenBSD

    Christopher A. Kantarjiev wrote:
    ....
    > The config code seems to try to test, so ... is the OpenBSD realpath "broken",
    > or the mysql config code, or ...

    .....


    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.

  4. Re: mysql and realpath on OpenBSD

    Christopher A. Kantarjiev wrote:
    > 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 ...


    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.


  5. Re: mysql and realpath on OpenBSD

    Christopher A. Kantarjiev wrote:
    > 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


    did you try with hard links instead?

  6. Re: mysql and realpath on OpenBSD

    zarko bulatovic wrote:
    > Christopher A. Kantarjiev wrote:
    >
    >> 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

    >
    >
    > did you try with hard links instead?


    Hard links aren't very interesting when the point is to move the files onto
    another physical disk.

  7. Re: mysql and realpath on OpenBSD

    Chris Kantarjiev wrote:
    > zarko bulatovic wrote:
    >
    >> Christopher A. Kantarjiev wrote:
    >>
    >>> 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

    >>
    >>
    >>
    >> did you try with hard links instead?

    >
    >
    > Hard links aren't very interesting when the point is to move the files
    > onto another physical disk.


    yes...my error. i didnt see that he wants files to be on anhoter disk.

+ Reply to Thread