Bug #29725 mysqlhotcopy table regex fails on tables with underscore
Submitted: 11 Jul 2007 15:19 Modified: 13 Aug 2007 15:16
Reporter: Ben Vaughn Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Backup Severity:S2 (Serious)
Version:1.22 OS:Any
Assigned to: CPU Architecture:Any
Tags: mysqlhotcopy, regex, underscore

[11 Jul 2007 15:19] Ben Vaughn
Description:
Hi,

  I just noticed while trying to use ZRM that it wasn't backing up my tables (most of which have underscores in them.)  I traced the problem back to mysqlhotcopy.  Basically the regex doesn't parse underscore characters correctly for whatever reason and will not handle them.  Details below.

How to repeat:
awhq8231:/etc/mysql-zrm root# "/usr/local/mysql/bin"/mysqlhotcopy --socket="/tmp/mysql.sock" http_auth./^user_info$/ "/Volumes/storage/mysql-backup/dailyrun/20070711100428"
No tables to hot-copy at /usr/local/mysql/bin/mysqlhotcopy line 391.
awhq8231:/etc/mysql-zrm root#

Suggested fix:
Fix the regex
[13 Jul 2007 15:16] Hartmut Holzgraefe
can't reproduce this with mysqlhotcopy 1.22 from MySQL 5.0.42 
and a MySQL 5.0.42 server:

$ mysql

mysql> create database http_auth;
Query OK, 1 row affected (0.00 sec)

mysql> create table http_auth.user_info (i int);
Query OK, 0 rows affected (0.31 sec)

$ mkdir /tmp/foo

$ mysqlhotcopy http_auth./^user_info$/ /tmp/foo
Locked 1 tables in 0 seconds.
Flushed tables (`http_auth`.`user_info`) in 0 seconds.
Copying 3 files...
Copying indices for 0 files...
Unlocked tables.
mysqlhotcopy copied 1 tables (3 files) in 0 seconds (0 seconds overall).

$ tree /tmp/foo
/tmp/foo
`-- http_auth
    |-- user_info.MYD
    |-- user_info.MYI
    `-- user_info.frm
[13 Aug 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".