Bug #53556 mysqlhotcopy: noindices doesn't work as described.
Submitted: 11 May 2010 9:09 Modified: 17 May 2010 11:49
Reporter: Horst Hunger Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.1 OS:Linux ( 2.6.27.45-0.1-default #1 SMP 2010-02-22 x86_64 x86_64 x86_64 GNU/Linux)
Assigned to: CPU Architecture:Any
Triage: Triaged: D2 (Serious)

[11 May 2010 9:09] Horst Hunger
Description:
Setting the --noindices option shall avoid the backup of "full index files", which seems to be MYI files. But they also exist in the backup database.

How to repeat:
let $MYSQLD_DATADIR= `SELECT @@datadir`;
CREATE DATABASE hotcopy_test;
USE hotcopy_test;
CREATE TABLE t1 (c1 int, c2 varchar(20));
CREATE TABLE t2 (c1 int, c2 varchar(20));
INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
--exec ../scripts/mysqlhotcopy --noindices -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save || true;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--list_files $MYSQLD_DATADIR/hotcopy_save
DROP DATABASE hotcopy_test;
DROP DATABASE hotcopy_save;
[14 May 2010 15:26] Susanne Ebrecht
Horst,

do you see a different file size?
[17 May 2010 9:57] Horst Hunger
--exec ls -l $MYSQLD_DATADIR/hotcopy_save:

+-rw-rw---- 1 horst users   65 May 17 12:55 db.opt                                               
+-rw-rw---- 1 horst users   64 May 17 12:55 t1.MYD                                               
+-rw-r--r-- 1 horst users 1024 May 17 12:55 t1.MYI                                               
+-rw-rw---- 1 horst users 8582 May 17 12:55 t1.frm                                               
+-rw-rw---- 1 horst users   64 May 17 12:55 t2.MYD                                               
+-rw-r--r-- 1 horst users 1024 May 17 12:55 t2.MYI                                               
+-rw-rw---- 1 horst users 8582 May 17 12:55 t2.frm                                               
+-rw-rw---- 1 horst users   64 May 17 12:55 t3.MYD                                               
+-rw-r--r-- 1 horst users 1024 May 17 12:55 t3.MYI                                               
+-rw-rw---- 1 horst users 8582 May 17 12:55 t3.frm                                    

--exec od -cx $MYSQLD_DATADIR/hotcopy_save/t1.MYI:
           
+0000000 376 376  \a 001  \0 001 001   )  \0 260  \0   d  \0 260  \0  \0                         
+        fefe 0107 0100 2901 b000 6400 b000 0000                                                 
+0000020  \0  \0  \0  \0  \b  \0  \0  \0  \0  \0 031 377  \0  \0  \0  \0                         
+        0000 0000 0008 0000 0000 ff19 0000 0000                                                 
+0000040  \0  \0  \0 002  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0                         
+        0000 0200 0000 0000 0000 0000 0000 0000                                                 
+0000060  \0  \0  \0 002 377 377 377 377 377 377 377 377  \0  \0  \0  \0                         
+        0000 0200 ffff ffff ffff ffff 0000 0000                                                 
+0000100  \0  \0 004  \0  \0  \0  \0  \0  \0  \0  \0   @  \0  \0  \0  \0                         
+        0000 0004 0000 0000 0000 4000 0000 0000                                                 
+0000120  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0                         
+        0000 0000 0000 0000 0000 0000 0000 0000                                                 
+0000140  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   ( 265                         
+        0000 0000 0000 0000 0000 0000 0000 b528                                                 
+0000160  \0  \0  \0   .  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0  \0                         
+        0000 2e00 0000 0000 0000 0100 0000 0000                                                 
+0000200  \0  \0  \0  \0   K 361 022   {  \0  \0  \0  \0  \0  \0  \0  \0
+        0000 0000 f14b 7b12 0000 0000 0000 0000
+*
+0000240  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
+        0000 0000 0000 0000 0000 0000 0000 0000
+0000260  \0  \0  \0  \0  \0  \0 004  \0  \0  \0  \0  \0  \0  \0  \0  \0
+        0000 0000 0000 0004 0000 0000 0000 0000
+0000300  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
+        0000 0000 0000 0000 0000 0000 0000 0000
+0000320  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 032
+        0000 0000 0000 0000 0000 0000 0000 1a00
+0000340  \0  \0  \0 032  \0  \0  \0 003  \0  \0  \0 034  \0  \0  \0 024
+        0000 1a00 0000 0300 0000 1c00 0000 1400
+0000360  \0  \0  \0 003  \0  \0  \0 001 006 003  \0  \0  \0 001  \0  \0
+        0000 0300 0000 0100 0306 0000 0100 0000
+0000400  \0  \0  \0  \b  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
+        0000 0800 0000 0000 0000 0000 0000 0000
+0000420  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0  \0 003  \0 004 001
+        0000 0000 0000 0100 0000 0000 0003 0104
+0000440  \0  \0  \0  \b  \0 025 002  \0  \0  \0  \0  \0  \0  \0  \0  \0
+        0000 0800 1500 0002 0000 0000 0000 0000
+0000460  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
+        0000 0000 0000 0000 0000 0000 0000 0000
+*
+0002000
[17 May 2010 10:01] Horst Hunger
No differences.
[17 May 2010 11:49] Susanne Ebrecht
Verified as described by taking reporters tests.