Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid sequence 0 != 1 #814

Open
decadestory opened this issue Aug 24, 2023 · 6 comments
Open

invalid sequence 0 != 1 #814

decadestory opened this issue Aug 24, 2023 · 6 comments

Comments

@decadestory
Copy link

mysql 8.0.31
error in canal.go:
t, err := schema.NewTable(c, db, table)

error info:
invalid sequence 0 != 1

any solution please ?

@lance6716
Copy link
Collaborator

How to reproduce the problem please?

@decadestory
Copy link
Author

Occasionally~~~ my mysqldump version is mysql5.7 , Is this the reason? i will try

@decadestory
Copy link
Author

when table struct changed....

file:schema.go
method:func (ta *Table) fetchColumns(conn mysql.Executer) error
line:r, err := conn.Execute(fmt.Sprintf("show full columns from %s.%s", ta.Schema, ta.Name))

error info:
invalid sequence 0 != 1

could you give some advice?

@lance6716
Copy link
Collaborator

I don't know how to reproduce based on your response. Can you provide step-by-step actions to reproduce?

@decadestory
Copy link
Author

要怎么说呢,这是偶然出现的,运行下来看,貌似表结构变了,就可能会出这个问题,我这边是同一个程序里运行了多个c, err := canal.NewCanal(cfg)实例。我想知道,是不是conn连接的原因:类似#456

@decadestory
Copy link
Author

找到问题了,mysql连接设置了超时,mysql服务器会主动断掉conn连接,这时候换个表修改,就有这个问题,我看有一个HeartbeatPeriod 配置好像没有用,不知道有没有其他地方可以设置心跳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants