Bug #670 mysqlbinlog|mysql still broken even when the loaded file exists (syntax error)
Submitted: 18 Jun 2003 6:16 Modified: 4 Jul 2003 5:20
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:4.0 OS:Any (all)
Assigned to: Victor Vagin CPU Architecture:Any

[18 Jun 2003 6:16] Guilhem Bichot
Description:
See how-to-repeat for how to create the binlog. Then:
[guilhem@gbichot2 1]$ /m/mysql-4.0/client/mysqlbinlog gbichot2-bin.001
# at 4
#030618 14:57:14 server id 1  log_pos 4         Start: binlog v 3, server v 4.0.14-debug-log created 030618 14:57:14
# at 79
#030618 14:57:28 server id 1  log_pos 79        Query   thread_id=4     exec_time=0     error_code=0
use test;
SET TIMESTAMP=1055941048;
create table if not exists v(a int);
# at 149
LOAD DATA INFILE '~/v.txt' INTO TABLE v  FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (a);
 file_id: 1  block_len: 2
# at 219
#030618 14:58:00 server id 1  log_pos 219
#Exec_load: file_id=1
# at 242
#030618 15:01:46 server id 1  log_pos 242       Rotate to gbichot2-bin.002  pos: 4

NOTE THAT I DON'T DELETE THE LOADED FILE.

You can see the "file_id: 1  block_len: 2" which causes a syntax error when piped into mysql:
[guilhem@gbichot2 1]$ /m/mysql-4.0/client/mysqlbinlog gbichot2-bin.001 | mysql1
ERROR 1064 at line 10: 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 'file_id: 1  block_len: 2' at line 1

It's just a # to add I think?
In 4.1 things work fine (it was my mistake to formerly say this did not work, I apologize).

How to repeat:
create table if not exists v(a int);
LOAD DATA INFILE '~/v.txt' INTO TABLE v;
flush logs;

then see description please.
[1 Jul 2003 1:55] Victor Vagin
We're waiting for Monty's answer
[2 Jul 2003 6:43] Victor Vagin
will be implemented mysql-4.1 variant
[4 Jul 2003 5:20] Victor Vagin
Thank you for your bug report. This issue has been fixed in the latest
development tree for that product. You can find more information about
accessing our development trees at 
    http://www.mysql.com/doc/en/Installing_source_tree.html

mysqlbinlog was doungraded from mysql-4.1