Bug #46653 mysqlhotcopy fails if db/table name contains '.'
Submitted: 11 Aug 16:50 Modified: 12 Aug 7:04
Reporter: Scott Noyes
Status: Duplicate
Category:Client Severity:S3 (Non-critical)
Version:5.1 OS:Linux
Assigned to: Target Version:

[11 Aug 16:50] Scott Noyes
Description:
mysqlhotcopy's quote_names splits db and table names on the '.' character:

  my ($db, $table, @cruft) = split( /\./, $name );
  die "Invalid db.table name '$name'" if (@cruft || !defined $db || !defined $table );

If the db or table name contains a '.' character, then @cruft is populated and the script
fails with "Invalid db.table name"

How to repeat:
mysql -e "CREATE DATABASE `test.period`; CREATE TABLE `test.period`.t1 (id int)"
mysqlhotcopy --regexp=period backupFolder

Suggested fix:
my ($db, $table, @cruft) = $name =~ /`/ ? split( /`\.`/, $name ) : split( /`?\.`?/, $name
);
[12 Aug 7:04] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes
this very problem. Even if you feel that your issue is somewhat different, the resolution
is likely
to be the same. Because of this, we hope you add your comments to the original bug
instead.

Thank you for your interest in MySQL.

Duplicate of bug #27694
[12 Aug 7:13] Sveta Smirnova
Scott,

> his database name does not contain a dot, but is doubled:

This is another case. Please send us output of SHOW CREATE TABLE problem_table and exact
name of the database.