Skip to content

Commit

Permalink
fixing vreplication bug leading to panic
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Feb 4, 2025
1 parent e24d767 commit cdbab82
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func buildTablePlan(tableName string, rule *binlogdatapb.Rule, colInfos []*Colum

// if there are no columns being selected the select expression can be empty, so we "select 1" so we have a valid
// select to get a row back
if len(tpb.sendSelect.SelectExprs.Exprs) == 0 {
if tpb.sendSelect.SelectExprs == nil || len(tpb.sendSelect.SelectExprs.Exprs) == 0 {
tpb.sendSelect.AddSelectExpr(&sqlparser.AliasedExpr{
Expr: sqlparser.NewIntLiteral("1"),
})
Expand Down

0 comments on commit cdbab82

Please sign in to comment.