Bug #38045 Backup, MyISAM and file system encoding
Submitted: 11 Jul 2008 13:49 Modified: 21 Jul 2008 16:34
Reporter: Susanne Ebrecht Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0-Backup OS:Any
Assigned to: Ingo Strüwing CPU Architecture:Any
Tags: regression

[11 Jul 2008 13:49] Susanne Ebrecht
Description:
Take test from "How to repeat" and make it on MySQL bzr tree and on Backup tree.

I took trees from yesterday evening and today morning.

You will recognise that all will work fine on MySQL 6.0 but on Backup tree:

mysql> backup database encodingtest to 'foo';
ERROR 26 (HY000): Error on realpath() on 'encodingtest/äöüߣå.MYI' (Error 2)

!perror 2
OS error code   2:  No such file or directory

looking to file system:

$ ls /PATH_TO_VERSION/var/encodingtest

@0k@1i@1o@1j@00a3@0l.frm
@0k@1i@1o@1j@00a3@0l.MYD
@0k@1i@1o@1j@00a3@0l.MYI

This is the same in MySQL 6.0 and Backup data dir.

How to repeat:
create database encodingtest character set utf8;

use encodingtest;

set names utf8;

sql_mode=ANSI_QUOTES;

create table "äöüߣå"(id serial);

backup database encodingtest to 'foo';

Suggested fix:
The internal converting to file system encoding handling seems to be broken here.
[14 Jul 2008 15:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/49689

2662 Ingo Struewing	2008-07-14
      Bug#38045 - Backup, MyISAM and file system encoding
      
      Table names with non-ASCII characters could not be backed up.
      
      The MyISAM native backup driver used the original, non-translated table name.
      
      Fixed by using the translated name.
[14 Jul 2008 17:13] Chuck Bell
Approved.
[19 Jul 2008 16:22] Ingo Strüwing
Queued to 6.0-backup.
Pushed to 6.0.7.
[21 Jul 2008 16:34] Paul DuBois
Noted in 6.0.7 changelog.

MyISAM tables with non-ASCII characters in their names could not be
backed up because the MyISAM native backup driver did not handle them
properly.
[14 Sep 2008 2:19] Bugs System
Pushed into 6.0.7-alpha  (revid:ingo.struewing@sun.com-20080714153303-1y0zdx1tccuhvbu0) (version source revid:sven@mysql.com-20080818195835-r615g9zz6xphmkzg) (pib:3)
[4 Jan 2010 12:04] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/95884