Bug #46215 binlog of insert, update statements are displayed as a string can not be identif
Submitted: 16 Jul 2009 2:50 Modified: 16 Jul 2009 4:19
Reporter: zhang jiqing Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:GA 5.1.36 OS:Other (64bit centos4.6 2.6.9-67.ELsmp)
Assigned to: CPU Architecture:Any
Tags: binlog, insert, UPDATE

[16 Jul 2009 2:50] zhang jiqing
Description:
My Settings my.cn as  binlog_format = "MIXED",
when i use mysqlbinlog comment to view binlog files as:
#mysqlbinlog mysql-bin.000001 >bin1
#cat bin1
I get  the following:
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#090716  0:23:32 server id 1  end_log_pos 106   Start: binlog v 4, server v 5.1.36-log created 090716  0:23:32 at startup
# Warning: this binlog was not closed properly. Most probably mysqld crashed writing it.
ROLLBACK/*!*/;
BINLOG '
hAJeSg8BAAAAZgAAAGoAAAABAAQANS4xLjM2LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAACEAl5KEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
'/*!*/;
# at 106
#090716  0:35:02 server id 1  end_log_pos 182   Query   thread_id=12    exec_time=0     error_code=0
SET TIMESTAMP=1247675702/*!*/;
SET @@session.pseudo_thread_id=12/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=0/*!*/;
SET @@session.sql_mode=2097152/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=33/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 182
# at 252
#090716  0:35:02 server id 1  end_log_pos 252   Table_map: `tianya_score`.`user_account_1` mapped to number 18
#090716  0:35:02 server id 1  end_log_pos 340   Update_rows: table id 18 flags: STMT_END_F

BINLOG '
NgVeShMBAAAARgAAAPwAAAAAABIAAAAAAAAADHRpYW55YV9zY29yZQAOdXNlcl9hY2NvdW50XzEA
BA8PDwMGNgA8ADAAAA==
NgVeShgBAAAAWAAAAFQBAAAQABIAAAAAAAEABP//8AgxMjQ4OTY3OAxrb25nYmFpZGVodWEBMAAA
AADwCDEyNDg5Njc4DGtvbmdiYWlkZWh1YQEwAQAAAA==
'/*!*/;
# at 340
# at 417
#090716  0:35:02 server id 1  end_log_pos 417   Table_map: `tianya_score`.`product_account` mapped to number 17
#090716  0:35:02 server id 1  end_log_pos 529   Update_rows: table id 17 flags: STMT_END_F

BINLOG '
NgVeShMBAAAATQAAAKEBAAAAABEAAAAAAAAADHRpYW55YV9zY29yZQAPcHJvZHVjdF9hY2NvdW50
AAf+D/4DBP4MCf42PAD+AwT+AwA=
NgVeShgBAAAAcAAAABECAAAQABEAAAAAAAEAB///gAYwMDAwMDEM5aSp5rav56S+5Yy6ATOl1cT/
AAAAAAExwJM/sEUSAACABjAwMDAwMQzlpKnmtq/npL7ljLoBM6TVxP8AAAAAATHAkz+wRRIAAA==
"bin57" 5182024L, 223145213C

How to repeat:
use GA 5.1.36
Settings my.cn as  binlog_format = "MIXED"
[16 Jul 2009 4:19] Valeriy Kravchuk
The result you get is correct. In MIXED mode your INSERTs and UPDATEs were logged in row format. Please, read http://dev.mysql.com/doc/refman/5.1/en/mysqlbinlog-row-events.html on how to decode these events to something more human-readable.