From a4a559489a211901c30da1a5e543f49e2974243f Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Mon, 14 Jun 2021 21:25:25 -0400 Subject: [PATCH] [vexec] Backport fix for typechange in sqlparser In upstream (where the previous commit was cherry-picked from), all of the `New` functions take a `string` argument, but previously (and therefore in our vtctld branch) they took a `[]byte`. Signed-off-by: Andrew Mason --- go/vt/vtctl/workflow/vexec/query_planner.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go/vt/vtctl/workflow/vexec/query_planner.go b/go/vt/vtctl/workflow/vexec/query_planner.go index b271e065b3e..f95a1350cba 100644 --- a/go/vt/vtctl/workflow/vexec/query_planner.go +++ b/go/vt/vtctl/workflow/vexec/query_planner.go @@ -320,7 +320,7 @@ func (planner *VReplicationLogQueryPlanner) planSelect(sel *sqlparser.Select) (Q var expr sqlparser.Expr switch len(streamIDs) { case 0: // WHERE vreplication_log.vrepl_id IN () => WHERE 1 != 1 - one := sqlparser.NewIntLiteral("1") + one := sqlparser.NewIntLiteral([]byte("1")) expr = &sqlparser.ComparisonExpr{ Operator: sqlparser.NotEqualOp, Left: one, @@ -332,12 +332,12 @@ func (planner *VReplicationLogQueryPlanner) planSelect(sel *sqlparser.Select) (Q Left: &sqlparser.ColName{ Name: sqlparser.NewColIdent("vrepl_id"), }, - Right: sqlparser.NewIntLiteral(fmt.Sprintf("%d", streamIDs[0])), + Right: sqlparser.NewIntLiteral([]byte(fmt.Sprintf("%d", streamIDs[0]))), } default: // WHERE vreplication_log.vrepl_id IN (?) vals := []sqlparser.Expr{} for _, streamID := range streamIDs { - vals = append(vals, sqlparser.NewIntLiteral(fmt.Sprintf("%d", streamID))) + vals = append(vals, sqlparser.NewIntLiteral([]byte(fmt.Sprintf("%d", streamID)))) } var tuple sqlparser.ValTuple = vals