From 94cb3d0245b1bfddc9318fc11c682c4732fe8e46 Mon Sep 17 00:00:00 2001 From: xufei Date: Mon, 18 Nov 2024 11:06:02 +0800 Subject: [PATCH 1/2] disable hash join v2 by default Signed-off-by: xufei --- pkg/sessionctx/variable/tidb_vars.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sessionctx/variable/tidb_vars.go b/pkg/sessionctx/variable/tidb_vars.go index 70ecc304bcbbf..ddf77e39d7425 100644 --- a/pkg/sessionctx/variable/tidb_vars.go +++ b/pkg/sessionctx/variable/tidb_vars.go @@ -1548,7 +1548,7 @@ const ( DefTiDBEnableCheckConstraint = false DefTiDBSkipMissingPartitionStats = true DefTiDBOptEnableHashJoin = true - DefTiDBHashJoinVersion = joinversion.HashJoinVersionOptimized + DefTiDBHashJoinVersion = joinversion.HashJoinVersionLegacy DefTiDBOptObjective = OptObjectiveModerate DefTiDBSchemaVersionCacheLimit = 16 DefTiDBIdleTransactionTimeout = 0 From ecda52ac1229fd9581ca836245d904267d29798d Mon Sep 17 00:00:00 2001 From: xufei Date: Mon, 18 Nov 2024 11:59:44 +0800 Subject: [PATCH 2/2] update tests Signed-off-by: xufei --- tests/integrationtest/r/sessionctx/setvar.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integrationtest/r/sessionctx/setvar.result b/tests/integrationtest/r/sessionctx/setvar.result index 3a387cc4b76db..c848098efdbfb 100644 --- a/tests/integrationtest/r/sessionctx/setvar.result +++ b/tests/integrationtest/r/sessionctx/setvar.result @@ -1685,13 +1685,13 @@ select /*+ set_var(tidb_hash_join_version=optimized) */ @@tidb_hash_join_version optimized select @@tidb_hash_join_version; @@tidb_hash_join_version -optimized +legacy select /*+ set_var(tidb_hash_join_version=legacy) */ @@tidb_hash_join_version; @@tidb_hash_join_version legacy select @@tidb_hash_join_version; @@tidb_hash_join_version -optimized +legacy set @@global.max_execution_time=1000; select @@max_execution_time; @@max_execution_time