bingo2sql icon indicating copy to clipboard operation
bingo2sql copied to clipboard

MySQL Binlog 解析

Results 13 bingo2sql issues
Sort by recently updated
recently updated
newest added

请问下这个提示是什么意思呢?是解析的日志里有无效格式么,我使用的是本地binlog文件解析,正常情况下应该有2000条insert,最终解析到约100条出现这个提示并终止了程序

`bingo2sql -d psmsdb -B --start-file ./mysql-bin.000002 --start-time '2021-09-15 00:00:00' --stop-time '2021-09-16 23:59:59' -t x.sql,y.sql` 返回 ``` time="2021-09-17T17:15:36+08:00" level=error msg="binlog解析操作失败" file=bingo2sql.go line=181 time="2021-09-17T17:15:36+08:00" level=error msg="读取表结构文件失败(x.sql,y.sql): CreateFile x.sql,y.sql: The system cannot find...

## 代码段 parser.go ``` for { if p.cfg.StopNever { ctx = context.Background() } else { ctx, cancel = context.WithTimeout(context.Background(), 10*time.Second) defer cancel() // 此处在 每次循环中并不会被调用 } // e, err :=...

看了bingo2sql,没有输入当前语句的pos,是我哪里没用好麽?

我有个update修改了一个表中其中一个字段,利用bingo2sql查看的update语句只有我修改的那个字段,而不是set where部分为表的全部字段,不管改了没改 我以为是-M, --minimal-update,但是我发现加不加这个参数都达不到我的目的,而且加不加参数对输出没任何变化,这个应该怎么办

$ ./bingo2sql -hxxxx -Pxxx -uxxx -pxxx -d xx -t xxx,xxx,xxx,xxx --start-file='mysql-bin.000003' --start-time='2020-05-26 20:00:00' --stop-time='2020-05-26 23:50:00' -B --debug > flashback_xxx.sql INFO[2020-05-27T13:43:36+08:00] create BinlogSyncer with config {2000000111 xxx xxx xxx false false...

使用中发现,如果数据库中某些曾经存在的表已经删除了,工具会在解析中报错,形如:表`db`.`table`缺少列!当前列数:0,table的列数7。

单独使用--ddl --stop-never --show-gtid --show-time --show-all-time --show-thread --ddl --max 0 --debug ``` # 64f83485-8ec1-11ec-9822-005056a8e9ea:495 USE `test`; create table test02(id int); # 2024-03-01 11:29:03 # 64f83485-8ec1-11ec-9822-005056a8e9ea:496 INSERT INTO `test`.`test02`(`id`) VALUES(1); # 2024-03-01...

如何复现: 1 flush logs生成新的binlog,该binlog只执行DDL,show master status; 得到binlog file和position flush logs; create table t2(id int); show master status; -- | mysql-bin.004720 | 402 | ---后续不再执行其他SQL、binlog保持不变。 2 bingo2sql解析时,--stop-file --stop-pos使用第一步获取的binlog file和position。由于MySQL binlog 一直没有更新,bingo2sql将无法结束,需要Ctrl+C...

![image](https://github.com/hanchuanchuan/bingo2sql/assets/20376675/18ff60fb-2771-4726-9663-be59addd9f0b) 解析出来的update没有set条件,很奇怪