关于参数binlog_rows_query_log_events的疑惑

MySQL Version 
Server version: 5.6.25-log MySQL Community Server (GPL)
 
配置文件中配置了下面两行binlog_format = row
binlog_rows_query_log_events = on
 
我理解的是如果binlog_rows_query_log_events=on则在binlog中记录原生态的SQL但是经过试验并没有发现原生态的SQL,请问是我哪里还没有注意到吗?
 
这是执行的SQL
update t1 set vid = 200 where id = 28;
 
row格式下的binlog日志,其中并没有发现原生态的SQL语句
# at 972
#160217 21:41:03 server id 1113306  end_log_pos 1045 CRC32 0x26009eed   Query   thread_id=1     exec_time=0     error_code=0
SET TIMESTAMP=1455716463/*!*/;
BEGIN
/*!*/;
# at 1045
# at 1106
#160217 21:41:03 server id 1113306  end_log_pos 1159 CRC32 0x5700f3e4   Table_map: `green`.`t1` mapped to number 70
# at 1159
#160217 21:41:03 server id 1113306  end_log_pos 1233 CRC32 0xe5cf7a11   Update_rows: table id 70 flags: STMT_END_F

BINLOG '
b3jEVhPa/BAANQAAAIcEAAAAAEYAAAAAAAEABWdyZWVuAAJ0MQAEAwMPDwQeADwAAOTzAFc=
b3jEVh/a/BAASgAAANEEAAAAAEYAAAAAAAEAAgAE///wHAAAAGQAAAAIR3JlZW4xMDAA8BwAAADI
AAAACEdyZWVuMTAwABF6z+U=
'/*!*/;
# at 1233
#160217 21:41:03 server id 1113306  end_log_pos 1264 CRC32 0x9c425123   Xid = 18
COMMIT/*!*/;
DELIMITER ;
 
但是会在show binlog events in 'mysql-bin.000208';里面显示
 mysql-bin.000208 |  972 | Query       |   1113306 |        1045 | BEGIN                                               |
| mysql-bin.000208 | 1045 | Rows_query  |   1113306 |        1106 | # update t1 set vid = 200 where id = 28             |
| mysql-bin.000208 | 1106 | Table_map   |   1113306 |        1159 | table_id: 70 (green.t1)                             |
| mysql-bin.000208 | 1159 | Update_rows |   1113306 |        1233 | table_id: 70 flags: STMT_END_F                      |
| mysql-bin.000208 | 1233 | Xid         |   1113306 |        1264 | COMMIT /* xid=18 */                                 |
已邀请:

zhugaojian - 如:80后IT男..

赞同来自:

mysqlbinlog -v -v --base64-output=decode-rows mysql-bin.xxxxxx
试试这个

要回复问题请先登录注册