On Mon, 2002-02-11 at 02:04, Jeremy Zawodny wrote:
> On Mon, Feb 11, 2002 at 03:04:47PM +1300, Ian Collins wrote:
> > In mysqlhotcopy, function copy_files, there is a line,
> >
> > my @non_raid = grep { $_ !~ m:\d\d/: } @$files;
> >
> > (dont you just love perl?).
> >
> > If the database name in question is, for example, testone_750, a
> > perfectly legal database name (??), then no files get copied! and
> > the mysqlhotcopy fails.
>
> That's bad.
>
> > I presume (again ??) that the above line is trying to strip out all
> > ../ matches.
>
> Actually it's trying to strip out every database name which contains
> two digits in a row. That's clearly not ideal. We need something
> more specific there.
>
[snip]
What it should be doing is identifying every file which isn't in a
two-digit sub-directory inside a database directory.
It should read:
my @non_raid = grep { ! m:/\d{2}/[^/]+$: } @$files;
I've sent a patch to internals.
==
Martin
---------------------------------------------------------------------
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