Comment 5 for bug 420181

Revision history for this message
Peter Zaitsev (pz-percona) wrote : Re: [Bug 420181] Re: innobackupex fails to backup CSV tables causing mysql_upgrade to fail

Marcus,

What MySQL Version are you using ?

I think "table" for log was default in some very early MySQL 5.1 version
when it was reverted
to file because of huge performance overhead for logging in table.

Because people are typically concerned about logging performance overhead
and because most
of tools out there work with slow query log I have not seen using logging
to the table used that much.
At least you're the first one to run into this problem with XtraDB.

As in some configurations MySQL may use CSV tables by default we should fix
this issue still.

On Tue, Nov 30, 2010 at 12:57 AM, Marcus Bointon
<email address hidden>wrote:

> mysql> set global log_slow_queries = 'ON';
> ERROR 13 (HY000): Can't get stat of './mysql/slow_log.CSV' (Errcode: 2)
> mysql> set global slow_query_log = 'ON';
> ERROR 13 (HY000): Can't get stat of './mysql/slow_log.CSV' (Errcode: 2)
>
> --
> innobackupex fails to backup CSV tables causing mysql_upgrade to fail
> https://bugs.launchpad.net/bugs/420181
> You received this bug notification because you are a member of Percona
> developers, which is the registrant for Percona-XtraBackup.
>
> Status in Open source backup tool for InnoDB and XtraDB: Opinion
>
> Bug description:
> In MySQL 5.1, there are two CSV tables in the mysql schema (general_log and
> slow_log) which are not backuped by innobackupex.pl at all. So when the
> backup is used to build a slave and 'mysql_upgrade' is run, you get the
> following error:
>
>
> <pre>
> mysql.time_zone OK
> mysql.time_zone_leap_second OK
> mysql.time_zone_name OK
> mysql.time_zone_transition OK
> mysql.time_zone_transition_type OK
> mysql.user OK
> Running 'mysql_fix_privilege_tables'...
> ERROR 13 (HY000) at line 311: Can't get stat of './mysql/general_log.CSV'
> (Errcode: 2)
> ERROR 13 (HY000) at line 316: Can't get stat of './mysql/slow_log.CSV'
> (Errcode: 2)
> FATAL ERROR: Upgrade failed
> </pre>
>
> Solution:
> Patch innobackupex.pl to include CSV tables, specifically line 1811 from
>
> my $wildcard = '*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,opt,par}';
>
> to
>
> my $wildcard = '*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}';
>
>
>

--
Peter Zaitsev, CEO, Percona Inc.
Tel: +1 888 401 3401 ext 501 Skype: peter_zaitsev
24/7 Emergency Line +1 888 401 3401 ext 911

Percona Training Workshops
http://www.percona.com/training/