Alfranio Correia wrote:
> He Zhenxing wrote:
> > Alfranio Correia wrote:
> >
> >> Hi,
> >>
> >> Can you take a look at this bug?
> >>
> >>
> >
> > Sure.
> >
> >
> >> Besides, I would like to have your feedback on five topics:
> >>
> >> 1 - The documentation is not clear on what should happen when both
> >> options --slave-load-tmpdir
> >> and --secure-file-priv are defined.
> >> 1.1 In the patch, --secure-file-priv takes precedence over
> >> --slave-load-tmpdir whenever the LOAD_FILE and LOAD DATA INFILE are
> >> used. Is that ok?
> >>
> >>
> >
> > I think this would confusing the user if he had both options defined,
> > and found out that --slave-load-tmpdir did not work as expected.
> >
>
>
> Did you test it with MTR? It seems there is a problem with MTR.
> If you start a mysqld instance manually we can see by means of "show
> variables" that
> the option is set.
Do you mean --slave-load-tmpdir is always set to some value after mysqld
starts?
What I mean by my previous comment is that in your patch, if
--secure-file-priv is used, then LOAD FILEs are created in
--secure-file-priv directory even if --slave-load-tmpdir is defined too.
I think this is confusing and not consistent.
I think LOAD FILEs should be created in --slave-load-tmpdir in anyway
and allow SQL thread to load files from --slave-load-tmpdir direcotry
besides --secure-file-priv directory.
> > I's suggest to allow slave SQL thread to load files from the directory
> > specified by --slave-load-tmpdir too besides --secure-file-priv.
> >
> >
> >> 2 If one assigns invalid directories to any of these options, the slave
> >> crashes. This should
> >> be fixed before pushing the patch.
> >> 2.1 Should I do this when the options are initialized in the mysqld.cc?
> >> 2.2 Should I do this in the log_event.cc?
> >> 2.3 What should I do if the options are invalid?
> >>
> >
> > I think 2.1 is a better choice, and I think if any of these options are
> > invalid, mysqld should fail with an error message to state that.
> >
>
> ok !!! I agree with you.
> >
> >> 3. Sketch of the test:
> >> 3.1 Verify if the option is invalid:
> >> Transform the a relative path to an absolute path
> >> Check if the directory exists.
> >> Check if we have permissions to create and delete files.
> >>
> >> Cheers.
> >>
> >
> >