Skip to content

Commit

Permalink
Don't push down VindexMatch operations
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Feb 3, 2025
1 parent e3a0f68 commit 95eebc3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go/vt/vttablet/tabletserver/vstreamer/planbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,10 @@ func (plan *Plan) analyzeWhere(vschema *localVSchema, where *sqlparser.Where) er
ColNum: colnum,
Value: resolved.Value(plan.env.CollationEnv().DefaultConnectionCharset()),
})
// Add it to the expressions that get pushed down to mysqld.
plan.whereExprsToPushDown = append(plan.whereExprsToPushDown, expr)
if opcode != VindexMatch { // VindexMatch can only be performed in the VStreamer
// Add it to the expressions that get pushed down to mysqld.
plan.whereExprsToPushDown = append(plan.whereExprsToPushDown, expr)
}
case *sqlparser.FuncExpr:
// We cannot filter binlog events in VStreamer using MySQL functions so
// we only allow the in_keyrange() function, which is VStreamer specific.
Expand Down

0 comments on commit 95eebc3

Please sign in to comment.