[debian-mysql] Bug#567675: mysql-server: MySQL Bug #49479: Slave stops with syntax error: LOAD DATA event without escaped field names

Tyler MacDonald tyler at yi.org
Sat Jan 30 17:28:26 UTC 2010


Package: mysql-server
Version: 5.1.41-3
Severity: important


Replication is basically broken in this version of MySQL;

http://bugs.mysql.com/bug.php?id=49479

If a table contains a field name that must be escaped (eg, `key`
INT), loading data into that table, using LOAD DATA INFILE, will
break replication.

If logging in mixed or statement mode, the master will binlog a
LOAD DATA event without escaping the field names. Consequently,
the slave will stop with a syntax error:

Last_SQL_Error	Error 'You have an error in your SQL syntax; check the
manual that
corresponds to your MySQL server version for the right syntax to use near
'key, c2)' at
line 1' on query. Default database: 'test'. Query: 'LOAD DATA INFILE
'../../tmp/SQL_LOAD-2-1-1.data' REPLACE INTO  TABLE `t` FIELDS TERMINATED BY
'\t'
ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (key, c2)'


There is a patch available on the bug report on MySQL.com.




-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mysql-server depends on:
ii  mysql-server-5.1              5.1.41-3   MySQL database server binaries

mysql-server recommends no packages.

mysql-server suggests no packages.

-- debconf-show failed





More information about the pkg-mysql-maint mailing list