Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,14 @@ suite("mtmv_with_sql_cache") {
waitingMTMVTaskFinishedByMvName(mv_name1)
sleep(10 * 1000)
assertNoCache "select * from ${mv_name1}"
assertNoCache mtmv_sql1
// mtmv_sql1 was cached while the MTMV was stale, so the cached plan may
// scan only unchanged base tables and legally survive the MTMV refresh.
// Bypass SQL cache to keep checking that the refreshed MTMV is chosen,
// then compare cached and uncached results for correctness.
sql "set enable_sql_cache=false"
mv_rewrite_success(mtmv_sql1, mv_name1)
sql "set enable_sql_cache=true"
judge_res(mtmv_sql1)
assertHasCache "select * from ${nested_mv_name1}"
assertNoCache nested_mtmv_sql1

Expand Down
Loading