Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

session: remove date_add function from push down blacklist in new installed TiDB #39324

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions expression/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3762,8 +3762,6 @@ func TestExprPushdownBlacklist(t *testing.T) {
store := testkit.CreateMockStore(t)

tk := testkit.NewTestKit(t, store)
tk.MustQuery(`select * from mysql.expr_pushdown_blacklist`).Check(testkit.Rows(
"date_add tiflash DST(daylight saving time) does not take effect in TiFlash date_add"))

tk.MustExec("use test")
tk.MustExec("drop table if exists t")
Expand Down
2 changes: 0 additions & 2 deletions session/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -2267,8 +2267,6 @@ func doDMLWorks(s Session) {

writeNewCollationParameter(s, config.GetGlobalConfig().NewCollationsEnabledOnFirstBootstrap)

writeDefaultExprPushDownBlacklist(s)

writeStmtSummaryVars(s)

ctx := kv.WithInternalSourceType(context.Background(), kv.InternalTxnBootstrap)
Expand Down
6 changes: 6 additions & 0 deletions session/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ func TestBootstrap(t *testing.T) {
se, err = CreateSession4Test(store)
require.NoError(t, err)
doDMLWorks(se)
r = mustExec(t, se, "select * from mysql.expr_pushdown_blacklist where name = 'date_add'")
req = r.NewChunk(nil)
err = r.Next(ctx, req)
require.NoError(t, err)
require.Equal(t, 0, req.NumRows())
se.Close()
}

func globalVarsCount() int64 {
Expand Down