In the last episode (Jul 03), Mike Hall said:
> FreeBSD 4.5-STABLE with LinuxThreads 2.2.3. and MySQL 3.23.51. Duel
> PIII 1Ghz with 1G of RAM. All from source.
> 
> Compiled okay and came through super-smack and crash-me tests okay.
> But a few hours later, for no reason, MySQL decided to look at
> /var/tmp instead of /usr/local/mysql/var for the datadir.  There is
> nothing in the logs to suggest why this happened.  AFAIK, you have to
> restart mysqld to change the data dir, but the daemon was not
> restarted at any point.  SHOW VARIABLES revealed that the datadir was
> still set to /usr/local/mysql/var, but SHOW DATABASES listed the
> contents of /var/tmp (in my case vi.recover).  When I shutdown and
> restarted the system, it reverted to normal behaviour.
> 
> Anyone have any idea what is going on?

Weeird.  You don't happen to have written a UDF that changes
directories, do you?  From a quick scan of the source, mysql chdir()'s
to the datadir once on startup and uses relative paths to access
tables.  This means that any chdir() call made while mysql is running
will screw up table access from that point on.

-- 
        Dan Nelson
        [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to