Skip to content

Commit

Permalink
Revert "forbids json_contains from pushing down (pingcap#203)" (pingc…
Browse files Browse the repository at this point in the history
…ap#209)

This reverts commit f8516a2.
  • Loading branch information
AmoebaProtozoa authored Jan 30, 2023
1 parent 5c98716 commit 790cc21
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions session/bootstrap_serverless.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,14 @@ const (
// serverlessVersion2 added support for Disaggregated TiFlash, as a result, we can now safely enable mpp
// and two previously forbidden executor push-down.
serverlessVersion2 = 2
// serverlessVersion3 adds json contains to tikv push-down-blacklist.
serverlessVersion3 = 3
)

// currentServerlessVersion is defined as a variable, so we can modify its value for testing.
// please make sure this is the largest version
var currentServerlessVersion int64 = serverlessVersion3
var currentServerlessVersion int64 = serverlessVersion2

var bootstrapServerlessVersion = []func(Session, int64){
upgradeToServerlessVer2,
upgradeToServerlessVer3,
}

// updateServerlessVersion updates serverless version variable in mysql.TiDB table.
Expand Down Expand Up @@ -132,12 +129,3 @@ func upgradeToServerlessVer2(s Session, ver int64) {
mustExecute(s, "DELETE FROM mysql.expr_pushdown_blacklist where name in "+
"(\"Lead\", \"Lag\") and store_type = \"tiflash\"")
}

func upgradeToServerlessVer3(s Session, ver int64) {
if ver >= serverlessVersion3 {
return
}

mustExecute(s, "INSERT HIGH_PRIORITY INTO mysql.expr_pushdown_blacklist VALUES"+
"('json_contains','tikv', 'Compatibility with tikv 6.1')")
}

0 comments on commit 790cc21

Please sign in to comment.