Bug #34355 mysqlbinlog outputs backslash as path separator for 4.1 binlogs
Submitted: 6 Feb 2008 18:10 Modified: 29 Mar 2008 19:14
Reporter: Sven Sandberg
Status: Closed
Category:Server: Replication Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Sven Sandberg Target Version:5.1.24
Tags: 4.1 binlog, LOAD DATA INFILE, path separator, mysqlbinlog
Triage: D2 (Serious)

[6 Feb 2008 18:10] Sven Sandberg
Description:
Problem: When the windows version of mysqlbinlog reads 4.1 binlogs containing LOAD DATA
INFILE, it outputs backslashes as path separators in filenames. However, the output is
typically piped to a client, and client expect forward slashes.

How to repeat:
run 'mtr binlog_old_versions' under windows

Suggested fix:
Replace '\\' by '/' in filenames.
[6 Feb 2008 19:12] 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/41804

ChangeSet@1.2539, 2008-02-06 19:13:51+01:00, sven@riska.(none) +1 -0
  BUG#34355: mysqlbinlog outputs backslash as path separator for 4.1 binlogs
  Problem: When the windows version of mysqlbinlog reads 4.1 binlogs containing LOAD DATA
  INFILE, it outputs backslashes as path separators in filenames. However, the output is
  typically piped to a client, and client expect forward slashes.
  Fix: Replace '\\' by '/' in filenames.
[6 Feb 2008 19:25] Chuck Bell
Patch approved provided comments of new function annotated to include the limitation that
it will incorrectly convert '\\' to '/', in case someone uses '\\' in a pathname under
unix (per Mats).
[6 Feb 2008 20:24] Sven Sandberg
cf http://lists.mysql.com/commits/41578
[6 Mar 2008 17:15] Jon Stephens
Documented as follows in the 5.1.23-ndb-6.2.14 changelog:

        When the Windows version of mysqlbinlog read 4.1
        binlogs containing LOAD DATA INFILE statements, it
        output backslashes as path separators, causing problems for
        client programs expecting forward slashes. In such cases, it now
        converts \\ to / in directory paths.

Left status as PQ pending merges to mainline trees.
[29 Mar 2008 19:14] Jon Stephens
Also documented fix in 5.1.24 changelog.
[2 Apr 2008 21:44] Jon Stephens
Also noted in the 5.1.23-ndb-6.3.11 changelog.