Bug #11815 LOAD DATA INFILE not replicating to XP
Submitted: 8 Jul 2005 13:04 Modified: 8 Sep 2005 20:04
Reporter: Patrick Leary Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.0.7/5.0.10 BK OS:Windows (Windows XP)
Assigned to: Sergey Vlasenko CPU Architecture:Any

[8 Jul 2005 13:04] Patrick Leary
Description:
I am running Windows XP as a Slave to my Master which is on a Linux box. Both are running MySQL 5.0.7 and replication is set up properly and functions fine.

Except when my Windows Slave tries to replicate a LOAD DATA INFILE statement . The error I get is:

Last_Error: Error 'File 'C:WINDOWSTEMPSQL_LOAD-2-1-11.data' not found (Errcode: 2)' on query. Default database: 'namebank'. Query: 'LOAD DATA INFILE 'C:\WINDOWS\TEMP\SQL_LOAD-2-1-11.data' INTO TABLE `contact` FIELDS TERMINATED BY '\t' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r''

I have added these to lines to my configuration file:
slave-load-tmpdir="C:/WINDOWS/TEMP/"
tmpdir="C:/WINDOWS/TEMP/"

But, even though they are actually changing the variables, the MySQL Replication Process is still building a bad SQL statement.

How to repeat:
1. Set up a Slave on a Windows machine running MySQL 5.0.7.

2. Execute a LOAD DATA INFILE statement on the Master.

3. Check the 'SHOW SLAVE STATUS' on the Windows Slave to find the error.
[11 Jul 2005 18:56] MySQL Verification Team
c:\mysql\bin>mysqld-nt --defaults-file=c:\mysql\bin\my.ini --standalone --console
050711 15:53:22  InnoDB: Started; log sequence number 0 48756
050711 15:53:22 [Note] mysqld-nt: ready for connections.
Version: '5.0.10-beta-nt'  socket: ''  port: 3306  Source distribution
050711 15:54:09 [Note] Slave SQL thread initialized, starting replication in log 'hegel-bin.000002' at positi
050711 15:54:09 [Note] Slave I/O thread: connected to master 'miguel@192.168.0.119:3306',  replication starte
050711 15:54:19 [ERROR] Slave: Error 'File 'c:slavetempSQL_LOAD-2-1-5.data' not found (Errcode: 2)' on query.
050711 15:54:19 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave
[26 Aug 2005 10:19] 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/internals/28884
[30 Aug 2005 18:19] 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/internals/29047
[6 Sep 2005 15:31] Sergey Vlasenko
The bug is fixed in 5.0.13.
[8 Sep 2005 20:04] Paul DuBois
Noted in 5.0.13 changelog.