Giter Club home page Giter Club logo

my2sql's People

Contributors

liuhr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

my2sql's Issues

库名带-会报错

[2022/07/11 17:35:24] [fatal] sqlgen.go:324 Fail to generate update sql for bi-report.QRTZ_SCHEDULER_STATE mysql-bin.001840 1610282-1610529
error: Invalid database name specified
ORIGINAL STACK TRACE:
my2sql/sqlbuilder.(*updateStatementImpl).String
/root/go/src/my2sql/sqlbuilder/statement.go:702 +0x66c062
my2sql/base.GenUpdateSqlsForOneRowsEvent
/root/go/src/my2sql/base/sqlgen.go:322 +0x69fdf0
my2sql/base.GenForwardRollbackSqlFromBinEvent
/root/go/src/my2sql/base/events.go:151 +0x69083e
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371 +0x46c1c0

rows data:[RuoyiScheduler bi-report-client_sit1648115311244 1657529390600 15000]

[RuoyiScheduler bi-report-client_sit1648115311244 1657529405601 15000]

请问支持mysql MGR下的binlog解析吗

我测试了下最新的mysql 8.0.22在mg环境下的binlog
my2sql -user admin -password xxxxxxx-host 127.0.0.1 -port 3306 -work-type rollback -start-file mysql-bin.000118 -start-datetime "2021-01-06 18:50:00" -stop-datetime "2021-01-06 18:55:00" -output-dir .
[2021/01/06 19:32:30] [info] events.go:58 start thread 2 to generate redo/rollback sql
[2021/01/06 19:32:30] [info] binlogsyncer.go:144 create BinlogSyncer with config {1113306 mysql 127.0.0.1 3306 admin utf8 false false false Local false 0 0s 0s 0 false false 0}
[2021/01/06 19:32:30] [info] events.go:208 start thread to write redo/rollback sql into file
[2021/01/06 19:32:30] [info] events.go:58 start thread 1 to generate redo/rollback sql
[2021/01/06 19:32:30] [info] binlogsyncer.go:360 begin to sync binlog from position (mysql-bin.000118, 4)
[2021/01/06 19:32:30] [info] stats_process.go:166 start thread to analyze statistics from binlog
[2021/01/06 19:32:30] [info] repl.go:15 start to get binlog from mysql
[2021/01/06 19:32:30] [info] binlogsyncer.go:777 rotate to (mysql-bin.000118, 4)
[2021/01/06 19:32:51] [info] binlogsyncer.go:777 rotate to (mysql-bin.000119, 4)
[2021/01/06 19:32:51] [info] com.go:70 stop to get event. StopDateTime set. current event Timestamp 1609930503 Stop DateTime Timestamp 1609930500
[2021/01/06 19:32:51] [info] repl.go:17 finish getting binlog from mysql
[2021/01/06 19:32:51] [info] stats_process.go:266 exit thread to analyze statistics from binlog
[2021/01/06 19:32:51] [info] events.go:183 exit thread 1 to generate redo/rollback sql
[2021/01/06 19:32:51] [info] events.go:183 exit thread 2 to generate redo/rollback sql
[2021/01/06 19:32:51] [info] events.go:257 finish writing rollback sql into tmp files, start to revert content order of tmp files
[2021/01/06 19:32:51] [info] events.go:270 finish reverting content order of tmp files
[2021/01/06 19:32:51] [info] events.go:275 exit thread to write redo/rollback sql into file

表中含有json类型字段解析报错

mysql> insert into t values('{ "name":"John", "age":30, "city":"New York"}');
Query OK, 1 row affected (0.00 sec)

[root@hb30-dbs-mysql-128-186 innodblog]# time /data/my2sql.linux -user root -password -host 127.0.0.1 -port 7306 -mode repl -work-type 2sql -start-file mysqlbin.000022 -start-pos 195 -stop-file mysqlbin.000023 -stop-pos 195 -full-columns -output-toScreen
[2022/11/25 15:04:43] [info] events.go:61 start thread 1 to generate redo/rollback sql
[2022/11/25 15:04:43] [info] events.go:61 start thread 2 to generate redo/rollback sql
[2022/11/25 15:04:43] [info] binlogsyncer.go:164 create BinlogSyncer with config {1113306 mysql 127.0.0.1 7306 root utf8 false false false Local false 0 0s 0s 0 false false 0 0xc000070120 0x5fd8c0}
[2022/11/25 15:04:43] [info] binlogsyncer.go:400 begin to sync binlog from position (mysqlbin.000022, 195)
[2022/11/25 15:04:43] [info] events.go:221 start thread to write redo/rollback sql into file
[2022/11/25 15:04:43] [info] stats_process.go:166 start thread to analyze statistics from binlog
[2022/11/25 15:04:43] [info] repl.go:16 start to get binlog from mysql
[2022/11/25 15:04:43] [info] binlogsyncer.go:816 rotate to (mysqlbin.000022, 195)
[2022/11/25 15:04:43] [fatal] events.go:124 testdb2.t.c1 {"age":30,"city":"New York","name":"John"} []byte empty mysqlbin.000022 639-778

Connect mysql failed Error 1130: Host '127.0.0.1'

MySQL:Server version: 8.0.21
go version go1.15.5 linux/amd64

认证
| root | mysql_native_password |

[root@us-prod-dba-dbbackup my2sql]# ./my2sql -user root -password -port 3306 -host 10.0.4.177 -databases tstn -taaa -work-type rollback -start-file mysql-bin.000525 -start-datetime "2021-06-24 13:10:43" --stop-datetime "2021-06-24 13:15:43" -output-dir sql/

[2021/06/24 14:29:13] [fatal] context.go:575 Connect mysql failed Error 1130: Host '127.0.0.1' is not allowed to connect to this MySQL server

为啥连接的是127.0.0.1 还是使用错误了?

离线解析文件提示文件不存在

  • 离线解析执行命令如下
    ./my2sql -user root -password 123456 -host 192.168.1.100 -port 3306 -mode file -local-binlog-file /backup/mysql_binlog_backupv/mysql-bin.015669 -work-type 2sql -databases test -tables tb1 -start-file mysql-bin.015669 -stop-file mysql-bin.015743 -add-extraInfo -output-dir /tmp/0603

  • 报错提示如下
    [fatal] context.go:341 mysql-bin.015669 doesnot exists nor a file
    其实文件是存在的

MySQL8.0版本配置文件中认证插件可否取消

hi liuhr

MySQL8.0版本配置文件中加入 default_authentication_plugin =mysql_native_password 后,mysql错误日志会一致打印lugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

可否对此问题进行修复。 建议在mysql配置文件中取消default_authentication_plugin =mysql_native_password ,在创建账号 create user时指定 with mysql_native_password

编译出错

my2sql/base

base/file.go:134:23: this.Parser.ParseHeader undefined (type *replication.BinlogParser has no field or method ParseHeader)
base/file.go:171:23: this.Parser.ParseEvent undefined (type *replication.BinlogParser has no field or method ParseEvent)

代码里怎么缺了这个func啊

是不是不支持分析myisam表

image
当执行上面生成回滚语句的时候报错,提示遇到的那个库表是myisam表就直接退出了,要是不支持myisam表分析的话,能否加过滤某个数据库的功能呢

panic: Invalid column name in int column

样例执行过程报这个错误,列名被变更后无法识别到

goroutine 20 [running]:
my2sql/sqlbuilder.DoubleColumn(0xc0002f6920, 0xd, 0x728100, 0x79a0c8, 0xc00054a0f0)
/root/go/src/my2sql/sqlbuilder/column.go:191 +0xbe
my2sql/base.GetMysqlDataTypeNameAndSqlColumn(0xc0002f6910, 0x7, 0xc0002f6920, 0xd, 0xc00502a0f6, 0x728b13, 0x7, 0x79a0c8, 0xc00054a0f0)
/root/go/src/my2sql/base/sqlgen.go:81 +0xaa9
my2sql/base.GetSqlFieldsEXpressions(0x3e, 0xc00061f000, 0x3e, 0x40, 0xc000634400, 0x3e, 0x40, 0x0, 0xc0002f6748, 0x1, ...)
/root/go/src/my2sql/base/sqlgen.go:39 +0x145
my2sql/base.GenForwardRollbackSqlFromBinEvent(0x1, 0x927de0, 0xc000124010)
/root/go/src/my2sql/base/events.go:83 +0x5fe
created by main.main
/root/go/src/my2sql/main.go:26 +0x205
panic: Invalid column name in int column

goroutine 21 [running]:
my2sql/sqlbuilder.DoubleColumn(0xc0002f6920, 0xd, 0x728100, 0x79a0c8, 0xc0002cc1e0)
/root/go/src/my2sql/sqlbuilder/column.go:191 +0xbe
my2sql/base.GetMysqlDataTypeNameAndSqlColumn(0xc0002f6910, 0x7, 0xc0002f6920, 0xd, 0xc00502c0f6, 0x728b13, 0x7, 0x79a0c8, 0xc0002cc1e0)
/root/go/src/my2sql/base/sqlgen.go:81 +0xaa9
my2sql/base.GetSqlFieldsEXpressions(0x3e, 0xc00061f000, 0x3e, 0x40, 0xc000634400, 0x3e, 0x40, 0x0, 0xc0005f4d80, 0xc00011c0d0, ...)
/root/go/src/my2sql/base/sqlgen.go:39 +0x145
my2sql/base.GenForwardRollbackSqlFromBinEvent(0x2, 0x927de0, 0xc000124010)
/root/go/src/my2sql/base/events.go:83 +0x5fe
created by main.main
/root/go/src/my2sql/main.go:26 +0x20

引用的 go-mysql-org 内被修改,导致编译未通过问题

image

大佬,你这块改下被,改成自己新建个go文件去引用,而非直接去改这个引用项目内的代码,这个会导致 git下来后,编译找不到此方法

base/file.go:134:14: this.Parser.h undefined (type *replication.BinlogParser has no field or method h)
base/file.go:135:10: cannot assign *replication.EventHeader to this.Parser.h in multiple assignment

无法连接8.0.22实例

MySQL版本和用户信息
mysql> \s

/usr/local/mysql8/bin/mysql Ver 8.0.22 for Linux on x86_64 (MySQL Community Server - GPL)

Connection id: 33
Current database:
Current user: zlm@dmp1
SSL: Cipher in use is TLS_AES_256_GCM_SHA384
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 8.0.22 MySQL Community Server - GPL
Protocol version: 10
Connection: 10.186.60.62 via TCP/IP
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8mb4
Conn. characterset: utf8mb4
TCP port: 3307
Binary data as: Hexadecimal
Uptime: 16 hours 53 min 56 sec

Threads: 1 Questions: 102 Slow queries: 0 Opens: 283 Flush tables: 4 Open tables: 93 Queries per second avg: 0.001

mysql> select user(),current_user();
+----------+----------------+
| user() | current_user() |
+----------+----------------+
| zlm@dmp1 | zlm@% |
+----------+----------------+
1 row in set (0.00 sec)

测试1
使用8.0默认认证方式的用户连接(plugin为caching_sha2_password,权限为all)
mysql> select user,host,plugin from mysql.user where user='zlm';
+------------------+-----------+-----------------------+
| user | host | plugin |
+------------------+-----------+-----------------------+
| zlm | % | caching_sha2_password |
+------------------+-----------+-----------------------+
1 rows in set (0.00 sec)

09:37 AM zhlm1 (master) ~# ./my2sql -user zlm -password zlm -host 10.186.60.62 -port 3307 -start-file mysql-bin.000001 -start-datetime "2020-12-23 17:20:00" -stop-datetime "2020-12-23 18:00:00" -output-dir /tmp
[2020/12/24 09:37:46] [fatal] context.go:532 Connect mysql failed this authentication plugin is not supported

测试2
使用旧的认证方式用户进行连接(创建用户时用with指定plugin为mysql_native_password,权限为all)
mysql> select user,host,plugin from mysql.user where user='zlm';
+------------------+-----------+-----------------------+
| user | host | plugin |
+------------------+-----------+-----------------------+
| zlm | % | mysql_native_password |
+------------------+-----------+-----------------------+
1 rows in set (0.01 sec)

09:41 AM dmp1 (master) ~# ./my2sql -user zlm -password zlm -host 10.186.60.62 -port 3307 -start-file mysql-bin.000001 -start-datetime "2020-12-23 17:20:00" -stop-datetime "2020-12-23 18:00:00" -output-dir /tmp
[2020/12/24 09:57:01] [fatal] context.go:532 Connect mysql failed this user requires mysql native password authentication.

疑问
改了认证方式为5.7的mysql_native_password仍然报错,请问目前该工具是否还不支持8.0?

可以提供一下离线解析和事务支持么

  1. 当前支持连接数据库解析,如果要解析库中已purge的备份binlog文件,
    需要先构建数据库,移动binlog,修改binlog index文件。启动数据库,有些耗时。
    可以提供配置文件写入表结构,直接解析么。

  2. 当前解析出的SQL,不包含begin, commit等事务信息,可以提供一个选项,支持一下事务么。

不指定起始二进制日志文件,只指定时间起始,会扫描全部的二进制日志文件

-mode repl -work-type 2sql -start-datetime "2021-12-12 09:00:00" -stop-datetime "2021-12-12 09:20:00" -output-dir ./tmpdir

[2021/12/12 11:37:24] [info] stats_process.go:166 start thread to analyze statistics from binlog
[2021/12/12 11:37:24] [info] events.go:210 start thread to write redo/rollback sql into file
[2021/12/12 11:37:24] [info] binlogsyncer.go:144 create BinlogSyncer with config {1113306 mysql 127.0.0.1 3318 root utf8 false false false Local false 0 0s 0s 0 false false 0}
[2021/12/12 11:37:24] [info] events.go:60 start thread 2 to generate redo/rollback sql
[2021/12/12 11:37:24] [info] binlogsyncer.go:360 begin to sync binlog from position (, 4)
[2021/12/12 11:37:24] [info] events.go:60 start thread 1 to generate redo/rollback sql
[2021/12/12 11:37:24] [info] repl.go:16 start to get binlog from mysql
[2021/12/12 11:37:24] [info] binlogsyncer.go:777 rotate to (mysql_bin.000107, 4) 第一个日志文件

这很不智能,不能自动定位到吗?

不使用 default_authentication_plugin 行不

不使用 default_authentication_plugin =mysql_native_password ,这个能改进不,使用创建用户时候设置 mysql_navicate_password ,毕竟配置文件中不会强制加上 default_authentication_plugin =mysql_native_password 参数的

没找到显示每条sql的执行时间参数

有时候需要对binlog进行分析,定位问题,想要知道语句插入数据库时候的时间,没在参数列表中找到类似参数选项
像binlog2sql 中每条sql后面都会有该事务的完成时间

-stop-pos参数 不生效 5.7、8.0测试了一下均不生效,多生成了回滚数据

我先生成1000条数据,然后删除这1000条数据,删除的这1000条数据 pos点 354335 --- 430748,然后又生成1000条数据,rollback生成回滚语句的时候也会将最后生成的1000条数据回滚语句生成出来。-stop-pos就没有生效

语句:
my2sql -user xxx-password xx -work-type rollback -start-file mysql-bin.000021 -start-pos 354335 -stop-file my
sql-mysql-bin.000021 -stop-pos 430748--add-extraInfo -output-dir /tem/sql

binlog_status.txt 信息

image

Unknown command 是咋回事

/root/czx/my2sql -user root -password 123 -work-type 2sql -start-file mysql-bin.001242 -databases db1 -add-extraInfo -output-dir tmpdir
[2021/09/10 11:44:25] [info] events.go:208 start thread to write redo/rollback sql into file
[2021/09/10 11:44:25] [info] stats_process.go:166 start thread to analyze statistics from binlog
[2021/09/10 11:44:25] [info] events.go:58 start thread 2 to generate redo/rollback sql
[2021/09/10 11:44:25] [info] binlogsyncer.go:144 create BinlogSyncer with config {1113306 mysql 127.0.0.1 3306 root utf8 false false false Local false 0 0s 0s 0 false false 0}
[2021/09/10 11:44:25] [info] events.go:58 start thread 1 to generate redo/rollback sql
[2021/09/10 11:44:25] [info] binlogsyncer.go:360 begin to sync binlog from position (mysql-bin.001242, 4)
[2021/09/10 11:44:25] [fatal] repl.go:40 error replication from master 127.0.0.1:3306 ERROR 1047 (HY000): Unknown command

数据库库名导致的解析问题(help)

Liu sir,好!
mysql8版本,经过多次测试,发现以数字开头的库名,比如数据库库名为33_db,33db这样。解析生成sql时,会提示找不到数据库。但mydb这样的库名没问题。请大佬看看有什么办法吗?

[2022/11/09 13:51:08] [fatal] sqlgen.go:324 Fail to generate update sql for 33_db.u_addr binlog.000005 363-718
error: Invalid database name specified
ORIGINAL STACK TRACE:
my2sql/sqlbuilder.(*updateStatementImpl).String
/root/go/src/my2sql/sqlbuilder/statement.go:702 +0x681e78
my2sql/base.GenUpdateSqlsForOneRowsEvent
/root/go/src/my2sql/base/sqlgen.go:322 +0x6b57b0
my2sql/base.GenForwardRollbackSqlFromBinEvent
/root/go/src/my2sql/base/events.go:151 +0x6a629a
runtime.goexit
/usr/lib/golang/src/runtime/asm_amd64.s:1374 +0x46ac20

    rows data:[cdk_20211122141116TQM7 1 1 <nil> 1 <nil> <nil> 0 2021-11-22 14:11:17 <nil> <nil> <nil> 7 xiewei 1 <nil> <nil> <nil> 10 4 <nil> 2 2 <nil> <nil> 0 1 <nil> <nil> <nil> <nil> <nil> <nil>]

[cdk_20211122141116TQM7 1 1 1 0 2021-11-22 14:11:17 7 xiewei 1 2022-11-09 13:47:21 10 4 2 2 0 1 ]

实时分析数据丢失

背景

源库一直insert数据,指定位点启动my2sql,停止源库写入,查看解析SQL情况;

执行命令

./my2sql -user xxx -password 'xxx' -host xxx -port 3306 -mode repl -work-type 2sql -do-not-add-prifixDb -start-pos "7077788" -start-file "mysql-bin.000020" -output-dir /tmp/my2sql

日志

会一直卡在这里,单数数据一直在解析中
[2023/04/25 17:30:35] [info] binlogsyncer.go:148 create BinlogSyncer with config {1113306 mysql 10.10.xxx 3306 xxx utf8 false false false Local false 0 0s 0s 0 false false 0 }
[2023/04/25 17:30:35] [info] binlogsyncer.go:374 begin to sync binlog from position (mysql-bin.000020, 7077788)
[2023/04/25 17:30:35] [info] events.go:221 start thread to write redo/rollback sql into file
[2023/04/25 17:30:35] [info] stats_process.go:166 start thread to analyze statistics from binlog
[2023/04/25 17:30:35] [info] events.go:61 start thread 1 to generate redo/rollback sql
[2023/04/25 17:30:35] [info] events.go:61 start thread 2 to generate redo/rollback sql
[2023/04/25 17:30:35] [info] repl.go:16 start to get binlog from mysql
[2023/04/25 17:30:35] [info] binlogsyncer.go:791 rotate to (mysql-bin.000020, 7077788)

停止

  1. 停止源库insert数据写入;
  2. 因为my2sql 还在一直运行,只能kill -15 停止;

问题

查看源库与my2sql forward.20.sql 文件比较,数据行数不一致,如下:
源库:

mysql> select count(*) from demo_tbl1;
+----------+
| count(*) |
+----------+
|      790 |
+----------+
1 row in set (0.00 sec)

my2sql forward.20.sql 数据行数:

# wc -l forward.20.sql
775 forward.20.sql

但是my2sql binlog_status.txt 通过自行binlog解析位点比较,确认没问题:

binlog            starttime           stoptime            startpos   stoppos    inserts  updates  deletes  database        table               
mysql-bin.000020  2023-04-25_17:30:31 2023-04-25_17:30:34 7082310    7128882    157      0        0        testdb          demo_tbl1           
mysql-bin.000020  2023-04-25_17:30:35 2023-04-25_17:30:50 7129060    7317609    633      0        0        testdb          demo_tbl1  

可以看到最后的位点是 7129060,自行解析binlog,查看数据:

#230425 17:30:50 server id 52  end_log_pos 7317609 CRC32 0x4a6c2e53     Write_rows: table id 379 flags: STMT_END_F
### INSERT INTO `testdb`.`demo_tbl1`
### SET
###   @1=790 /* INT meta=0 nullable=0 is_null=0 */
###   @2=790 /* INT meta=0 nullable=1 is_null=0 */
###   @3='ljp790' /* VARSTRING(90) meta=90 nullable=1 is_null=0 */
###   @4='2023-04-25 17:30:50' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
# at 7317609
#230425 17:30:50 server id 52  end_log_pos 7317640 CRC32 0xca3b9bc9     Xid = 31435749
COMMIT/*!*/;

问题怀疑

forward.20.sql 数据不准,binlog_status.txt 无问题,怀疑kill -15 数据还在内存中,my2sql进程并没有把数据最终写入forward.20.sql文件,有其他方式优雅停止my2sql?

离线解析

大佬,离线解析啥时候发版?期待!

各种错误

/opt/my2sql -user xxx -password 'xxx' -host 127.0.0.1 -port 3310 -mode file -local-binlog-file ./mysql-bin.000015 -work-type stats -start-file mysql-bin.000015 -start-datetime "2021-10-08 10:20:00" -stop-datetime "2021-10-08 11:00:00" -big-trx-row-limit 500 -long-trx-seconds 300 -output-dir ./tmpdir

1、时间不兼容: 希望能自动补全
[2021/10/08 14:44:43] [fatal] context.go:290 invalid start datetime -start-datetime 2021-10-8 10:20:0

2、样例参数,报错信息看不懂,范围1到10,默认30000
[2021/10/08 14:45:07] [fatal] context.go:462 value of -b out of range: 500 is specfied, but Valid values range from 1 to 10, default 30000

类似的还有:
[2021/10/08 14:48:59] [fatal] context.go:462 value of -l out of range: 300 is specfied, but Valid values range from 0 to 1, default 3600

image
看不明白,为什么要限制在1到10,难到不可以大于20吗?

3、解析出来结果,看不出化了多少时间
mysql-bin.000016 2021-10-08_15:29:21 2021-10-08_15:29:21 55532604 110556152 1835008 0 [testdb.student(inserts=1835008, updates=0, deletes=0)]

实际执行:
[root@mysql_3310.sock][testdb]> insert into student(number,name,add_time,content) select number,name,add_time,content from student;
Query OK, 1835008 rows affected (23.53 sec)
Records: 1835008 Duplicates: 0 Warnings: 0

不支持带#号的表名,panic: Invalid table name

当创建带#表名,然后执行dml操作,再发起生成回滚语句,报错如下
[2021/08/04 16:38:31] [info] events.go:210 start thread to write redo/rollback sql into file
[2021/08/04 16:38:31] [info] events.go:60 start thread 2 to generate redo/rollback sql
[2021/08/04 16:38:31] [info] binlogsyncer.go:144 create BinlogSyncer with config {1113306 mysql 127.0.0.1 3306 root utf8 false false false Local false 0 0s 0s 0 false false 0}
[2021/08/04 16:38:31] [info] stats_process.go:166 start thread to analyze statistics from binlog
[2021/08/04 16:38:31] [info] events.go:60 start thread 1 to generate redo/rollback sql
[2021/08/04 16:38:31] [info] binlogsyncer.go:360 begin to sync binlog from position (mysql-bin.000295, 4)
[2021/08/04 16:38:31] [info] repl.go:16 start to get binlog from mysql
[2021/08/04 16:38:31] [info] binlogsyncer.go:777 rotate to (mysql-bin.000295, 4)
panic: Invalid table name

goroutine 36 [running]:
my2sql/sqlbuilder.NewTable(0xc000196060, 0xe, 0xc0000920c0, 0x6, 0x6, 0x6)
/root/go/src/my2sql/sqlbuilder/table.go:55 +0x314
my2sql/base.GenDeleteSqlsForOneRowsEvent(0xc0001a6000, 0x1e, 0xc000264780, 0xc0000920c0, 0x6, 0x6, 0xc0000aa030, 0x3, 0x3, 0x10100, ...)
/root/go/src/my2sql/base/sqlgen.go:257 +0x2ae
my2sql/base.GenDeleteSqlsForOneRowsEventRollbackInsert(...)
/root/go/src/my2sql/base/sqlgen.go:234
my2sql/base.GenForwardRollbackSqlFromBinEvent(0x1, 0x927de0, 0xc000196010)
/root/go/src/my2sql/base/events.go:137 +0xc12
created by main.main
/root/go/src/my2sql/main.go:26 +0x205

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.