Description:
The problem is summarized in the mail message below.
(This is a private message, but the thread originated on
dev-public@ with the same topic.)
Subject: Re: mysqlbinlog questions
From: Guilhem Bichot <guilhem@mysql.com>
To: Paul DuBois <paul@mysql.com>
Date: Fri, 12 Mar 2004 22:02:36 +0100
On Fri, 2004-03-12 at 21:07, Paul DuBois wrote:
> >Hi,
> >
> >On Fri, 2004-03-12 at 20:34, Paul DuBois wrote:
> >> At 20:13 +0300 3/12/04, Dmitri Lenev wrote:
> >> >Hi, Paul!
> >> >
> >> >* Paul DuBois <paul@mysql.com> [04/03/12 02:55]:
> >
> >>
> >> > > The option is documented like this:
> >> >>
> >> >> @item --local-load[=path], -l[path]
> >> >> Prepare files for local load in the given directory.
> >> >>
> >> >> What is the point of allowing the path value to be optional?
> >>I cannot see
> >> >> that specifying --local-load without a path value has any
> >>effect different
> >> >> than not specifying the option at all. That is, it appears to do nothing
> >> >> without a path value. Am I missing something?
> >> >
> >> >No, you are right. --local-load only specifies directory for temporary
> >> >files which are produced during dumping of LOAD DATA statements...
> >>
> >> Yes, that I understood. What I'm unclear about is why the option value
> >> (the path) should be optional rather than mandatory.
> >
> >local-load should require a mandatory argument, as you suggest;
> >presently, using the option without an argument is like not using the
> >option. I will take care of fixing code next week.
>
> Thanks. Should I file a bug report so there is a record of it?
yes, thank you. I am pushing a fix into 4.0 now.
How to repeat:
There's nothing to repeat. The problem is obvious
by inspection. :-)
Suggested fix:
I suppose in mysqlbinlog.cc, change this:
{"local-load", 'l', "Prepare files for local load in directory.",
(gptr*) &dirname_for_local_load, (gptr*) &dirname_for_local_load, 0,
GET_STR_ALLOC, OPT_ARG, 0, 0, 0, 0, 0, 0},
To this:
{"local-load", 'l', "Prepare files for local load in directory.",
(gptr*) &dirname_for_local_load, (gptr*) &dirname_for_local_load, 0,
GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
(OPT_ARG -> REQUIRED_ARG)