Bug #14399 LOAD DATA FROM MASTER fails
Submitted: 27 Oct 2005 15:56 Modified: 30 Aug 2006 18:29
Reporter: Christian Meisinger Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.0.15/5.0.16 BK source OS:Linux (linux suse 9.3)
Assigned to: Andrei Elkin CPU Architecture:Any

[27 Oct 2005 15:56] Christian Meisinger
Description:
my test setup looks like:
master mysql 4.1.14 (port 3341, socket /tmp/mysql4.sock)
slave mysql 5.0.15 (port 3351, socket /tmp/mysql5.sock)

both on the same server.

replication is ok. no problem at all.

BUT... if i try to drop and load a table from the master i get the following error:

051027 17:31:50 [ERROR] Key 1 - Found wrong stored record at 0
051027 17:31:50 [Note] Retrying repair of: './test/blabla' with keycache

not for every table. it seems so that a varchar column with fulltext causes this error.

i tried a repair.
doesn't help.

How to repeat:
-- execute following commands at the master:
CREATE TABLE `blabla` (
`id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`data` varchar( 255 ) NOT NULL default '',
PRIMARY KEY ( `id` ) , FULLTEXT KEY `data` ( `data` )
) ENGINE = MYISAM;

INSERT INTO `blabla`VALUES ( 1, 'a' );
INSERT INTO `blabla`VALUES ( 2, 'b' );
INSERT INTO `blabla`VALUES ( 3, 'c' );

-- then go to the slave:
DROP TABLE `blabla`;
LOAD TABLE `blabla` FROM MASTER;

i get this error:
051027 17:31:50 [ERROR] Key 1 - Found wrong stored record at 0
051027 17:31:50 [Note] Retrying repair of: './test/blabla' with keycache
[29 Oct 2005 1:00] MySQL Verification Team
051028 22:51:55 [Note] Slave I/O thread: connected to master 'userslave@localhost:3306',  replication started in log 'hegel-bin.000003' at position 179
051028 22:51:55 [Note] next log './hegel-relay-bin.000002' is currently active
051028 22:55:26 [ERROR] Key 1 - Found wrong stored record at 0
051028 22:55:26 [Note] Retrying repair of: './test/blabla' with keycache
051028 22:55:26 [ERROR] Key 1 - Found wrong stored record at 0
[30 Aug 2006 18:29] Trudy Pelzer
Since the current implementation of LOAD DATA FROM MASTER
and LOAD TABLE FROM MASTER is very limited, these statements
are deprecated in versions 4.1, 5.0 and 5.1 of MySQL. We will
introduce a more advanced technique (online backup) in a 
future (>5.1) version, that will have the added advantage of
working with more storage engines.

Due to the deprecated status of the statements, this bug will
not be fixed. For 5.1 and earlier, the recommended alternative 
solution to usign LOAD DATA|TABLE FROM MASTER is mysqldump on 
the master piped (or output copied) to the mysql client on the 
slave. This also has the advantage of working for all storage 
engines.

A deprecation warning will be added for these statements in
4.1, 5.0 and 5.1 shortly.