From 41ab6d8a9da35d95807ea46728629c31d5884038 Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Wed, 13 Dec 2023 12:57:21 +0800 Subject: [PATCH] test cop/batchcop Signed-off-by: Lloyd-Pottiger --- .../mpp/apply_with_late_materialization.test | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/fullstack-test/mpp/apply_with_late_materialization.test b/tests/fullstack-test/mpp/apply_with_late_materialization.test index 75ec02ccaab..56b83e00da1 100644 --- a/tests/fullstack-test/mpp/apply_with_late_materialization.test +++ b/tests/fullstack-test/mpp/apply_with_late_materialization.test @@ -33,6 +33,8 @@ func> wait_table test t t func> wait_table test t t1 # Test. + +# MPP mysql> set @@tidb_allow_mpp=1; set @@tidb_opt_enable_late_materialization=1; select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5; +------+ | xx | @@ -45,13 +47,29 @@ mysql> set @@tidb_allow_mpp=1; set @@tidb_opt_enable_late_materialization=0; sel +------+ | 5 | +------+ -mysql> set @@tidb_allow_mpp=0; set @@tidb_opt_enable_late_materialization=1; select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5; + +# BatchCop +mysql> set @@tidb_allow_mpp=0; set @@tidb_allow_tiflash_cop = 1; set @@tidb_allow_batch_cop = 1; set @@tidb_opt_enable_late_materialization=1; select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5; ++------+ +| xx | ++------+ +| 5 | ++------+ +mysql> set @@tidb_allow_mpp=0; set @@tidb_allow_tiflash_cop = 1; set @@tidb_allow_batch_cop = 1; set @@tidb_opt_enable_late_materialization=0; select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5; ++------+ +| xx | ++------+ +| 5 | ++------+ + +# Cop +mysql> set @@tidb_allow_mpp=0; set @@tidb_allow_tiflash_cop = 1; set @@tidb_allow_batch_cop = 0; set @@tidb_opt_enable_late_materialization=1; select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5; +------+ | xx | +------+ | 5 | +------+ -mysql> set @@tidb_allow_mpp=0; set @@tidb_opt_enable_late_materialization=0; select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5; +mysql> set @@tidb_allow_mpp=0; set @@tidb_allow_tiflash_cop = 1; set @@tidb_allow_batch_cop = 0; set @@tidb_opt_enable_late_materialization=0; select (select t.value from t where t.id = t1.id order by t.value limit 1) xx from t1 order by t1.value limit 5; +------+ | xx | +------+