fix issue where unique sql statistics are inaccurate

This commit is contained in:
gentle_hu
2021-12-21 20:14:19 +08:00
parent 27bdb0d62b
commit e7752a5030

View File

@ -835,6 +835,13 @@ List* RevalidateCachedQuery(CachedPlanSource* plansource, bool has_lp)
snapshot_set = true;
}
/*
* Query Tree is about to be rebuilt, reset is_top_unique_sql, otherwise, unique sql id
* can not be set.
*/
if (IS_UNIQUE_SQL_TRACK_TOP)
SetIsTopUniqueSQL(false);
/*
* Run parse analysis and rule rewriting. The parser tends to scribble on
* its input, so we must copy the raw parse tree to prevent corruption of