Rafal,
> I'm satisfied with changes wrt memory allocation and strings.
> Also, nice trick for isolating access to the server variable
> from the backup code. I have one question below about a thd
> variable which is not used anywhere I think.
>
> When I run the code, I got such warnings from MTR (found in
> var/log/warnings):
>
> master.err: main.backup: Error: Freeing wrong aligned pointer
> at line 1365, 'mysqld.cc'
>
> The line is where sys_var_backupdir.value is freed. Can you
> see this also in your tree? If yes then it needs to be fixed.
Fixed.
> About the place where the backupdir is appended to the backup
> location. You wrote:
>
> > (...) I could not move the
> > path manipulation code to the constructor of the stream
> object (base)
> > because the path is accessed prior to the stream creation point from
> > prepare().
>
> I don't think that you really need to access the full path
> anywhere except when
> opening the file. See the attached patch which implements the
> idea I described.
> I hope you agree to use that code in your patch (note that it
> makes the changes
> in the backup kernel much smaller).
Ok. Changed.
> > + THD *thd= ::current_thd;
>
> I wonder why this thd variable is defined here?
Both removed.
New patch forthcoming after Svoj's review.
Chuck