Skip to content

Commit

Permalink
sink(ticdc): add max allowed packet parmameters in sink dsn (pingcap#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei authored and 3AceShowHand committed Apr 3, 2023
1 parent 4d37629 commit 16ff3a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/sink/mysql/db_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ func generateDSNByConfig(
dsnCfg.Params["readTimeout"] = cfg.ReadTimeout
dsnCfg.Params["writeTimeout"] = cfg.WriteTimeout
dsnCfg.Params["timeout"] = cfg.DialTimeout
// auto fetch max_allowed_packet on every new connection
dsnCfg.Params["maxAllowedPacket"] = "0"

autoRandom, err := checkTiDBVariable(ctx, testDB, "allow_auto_random_explicit_insert", "1")
if err != nil {
Expand Down

0 comments on commit 16ff3a2

Please sign in to comment.