List:Commits« Previous MessageNext Message »
From:Peter Gulutzan Date:July 9 2008 6:19pm
Subject:Re: The backupdir warn/error discussion. Was:RE: bzr commit into
mysql-6.0-backup branch (cbell:2648) Bug#35230
View as plain text  
Hi Chuck,

On Wed, 2008-07-09 at 11:30 -0400, Chuck Bell wrote:
> Svoj, Rafal,
> 
> Our discussion today on IRC was about whether the server should warn or
> error is user specifies an invalid path for --backupdir on startup.
> 
> There are several options:
> a) leave code as is: throw error and stop
> b) print a warning and use default value for backupdir
> c) print a warning and use the patch specified for backupdir
> 

I am interpreting this as "the PATH specified for backupdir".

> In the effort to try and get this work into the next build, I have decided
> to implement option c). I think this concurs with both of your opinions on
> that matter.
> 
> I have also added code to validate backupdir prior backup or restore. An
> error message like the following is printed if backupdir is invalid:
> 
> mysql> backup database test to 'b1.bak';
> ERROR 1723 (HY000): The path specified for the variable backupdir cannot be
> accessed or is invalid. ref: something\invalid/goes/here
> 
> Peter: Do you disagree with this decision? 

I agree with this decision, assuming that I interpreted it correctly.

When I start with --plugin_dir=/wombat and say INSTALL PLUGIN, I get
mysql> install plugin x soname 'y';
ERROR 1126 (HY000): Can't open shared library '/wombat/y' (errno: 22
cannot open shared object file: No such file or directory)
... I think that would have been okay, just fail when you try to use it.

When I start with --tmpdir=/wombat, I get this when starting mysqld
linux:/home/pgulutzan # /usr/local/mysql/libexec/mysqld --user=root
--skip-networking --tmpdir=/wombat
/usr/local/mysql/libexec/mysqld: Can't create/write to file
'/wombat/ibWqg4Cx' (Errcode: 2)
... I think this is what you mean when you say "warning", that is,
mysqld warns on startup. I couldn't complain.

I've been looking at the MySQL Reference Manual description of datadir
http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_datadir
and I assume there will be something similar for backupdir saying
--backupdir = path
Option sets variable:      yes, backupdir
Variable name:             backupdir
Variable scope:            Global
Dynamic variable:          No
Value set:                 Type filename
So backupdir is a "global server system variable".
So error 1723 could refer to "the system variable backupdir" rather
than just "the variable backupdir".

-- 
Peter Gulutzan

Lead Software Engineer / SQL Architect
MySQL / Sun Microsystems


Thread
The backupdir warn/error discussion. Was:RE: bzr commit into mysql-6.0-backup branch (cbell:2648) Bug#35230Chuck Bell9 Jul
  • Re: The backupdir warn/error discussion. Was:RE: bzr commit intomysql-6.0-backup branch (cbell:2648) Bug#35230Peter Gulutzan9 Jul
    • Re: The backupdir warn/error discussion. Was:RE: bzr commit intomysql-6.0-backup branch (cbell:2648) Bug#35230Rafal Somla10 Jul
      • Re: The backupdir warn/error discussion. Was:RE: bzr commit intomysql-6.0-backup branch (cbell:2648) Bug#35230Peter Gulutzan10 Jul
        • Re: The backupdir warn/error discussion. Was:RE: bzr commit intomysql-6.0-backup branch (cbell:2648) Bug#35230Rafal Somla10 Jul
          • Re: The backupdir warn/error discussion. Was:RE: bzr commit intomysql-6.0-backup branch (cbell:2648) Bug#35230Peter Gulutzan14 Jul