From a8bd87d08f966e90015eb809c5420ff7cb6cfbc2 Mon Sep 17 00:00:00 2001 From: Andres Taylor Date: Mon, 16 Sep 2024 10:52:28 +0200 Subject: [PATCH] handle merged routes correctly Signed-off-by: Andres Taylor --- go/vt/vtgate/planbuilder/operators/route.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go/vt/vtgate/planbuilder/operators/route.go b/go/vt/vtgate/planbuilder/operators/route.go index 551d7b6d95e..8588333eba9 100644 --- a/go/vt/vtgate/planbuilder/operators/route.go +++ b/go/vt/vtgate/planbuilder/operators/route.go @@ -719,7 +719,8 @@ func (r *Route) GetOrdering(ctx *plancontext.PlanningContext) []OrderBy { // in Inputs() and thus not a part of the operator tree func (r *Route) TablesUsed(in []string) []string { for _, mw := range r.MergedWith { - in = append(in, mw.TablesUsed(in)...) + used := TablesUsed(mw) + in = append(in, used...) } return in }