k3s-io / kine

Run Kubernetes on MySQL, Postgres, sqlite, dqlite, not etcd.
Apache License 2.0
1.56k stars 233 forks source link

found a bug about scan mysql rows #313

Open wangyanphp opened 1 month ago

wangyanphp commented 1 month ago

https://github.com/k3s-io/kine/blob/master/pkg/logstructured/sqllog/sql.go#L353 image it should check rows.Error when finished rows.Next loop

brandond commented 1 month ago

Can you show an error caused by not doing this? Or some way to cause one?

wangyanphp commented 1 month ago

Can you show an error caused by not doing this? Or some way to cause one?

mysql error code 1160 can cause this

brandond commented 1 month ago

In case of a communication problem with the sql server, there would be additional errors that are handled outside the row iterator, right?

wangyanphp commented 1 month ago

In case of a communication problem with the sql server, there would be additional errors that are handled outside the row iterator, right?

yes