Skip to content

Commit 9ba368b

Browse files
ChangerRob-robot
authored andcommitted
fix some dbms_stats bugs
1 parent 48acecc commit 9ba368b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/pl/sys_package/ob_dbms_stats.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ int ObDbmsStats::export_schema_stats(ObExecContext &ctx, ParamStore &params, ObO
15101510
K(stat_table_param.db_name_), K(stat_table_param.tab_name_));
15111511
LOG_USER_ERROR(OB_TABLE_NOT_EXIST, to_cstring(stat_table_param.db_name_),
15121512
to_cstring(stat_table_param.tab_name_));
1513-
} else if (!params.at(2).is_null() && OB_FAIL(params.at(5).get_varchar((stat_table_param.stat_id_)))) {
1513+
} else if (!params.at(2).is_null() && OB_FAIL(params.at(2).get_varchar((stat_table_param.stat_id_)))) {
15141514
LOG_WARN("failed to get stat id ", K(ret));
15151515
} else {
15161516
ObArenaAllocator tmp_alloc("OptStatExport", OB_MALLOC_NORMAL_BLOCK_SIZE, global_param.tenant_id_);
@@ -1874,7 +1874,7 @@ int ObDbmsStats::import_schema_stats(ObExecContext &ctx, ParamStore &params, ObO
18741874
K(stat_table_param.tab_name_));
18751875
LOG_USER_ERROR(OB_TABLE_NOT_EXIST, to_cstring(stat_table_param.db_name_),
18761876
to_cstring(stat_table_param.tab_name_));
1877-
} else if (!params.at(2).is_null() && OB_FAIL(params.at(4).get_varchar(stat_table_param.stat_id_))) {
1877+
} else if (!params.at(2).is_null() && OB_FAIL(params.at(2).get_varchar(stat_table_param.stat_id_))) {
18781878
LOG_WARN("failed to get stat id ", K(ret));
18791879
} else {
18801880
ObArenaAllocator tmp_alloc("OptStatImport", OB_MALLOC_NORMAL_BLOCK_SIZE, global_param.tenant_id_);

src/share/stat/ob_hybrid_hist_estimator.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ int ObHybridHistEstimator::estimate_no_sample_col_hydrid_hist(ObIAllocator &allo
211211
LOG_WARN("failed to add no sample hybrid hist stat items", K(ret));
212212
} else if (OB_FAIL(fill_hints(allocator, param.tab_name_, param.gather_vectorize_, false))) {
213213
LOG_WARN("failed to fill hints", K(ret));
214+
} else if (OB_FAIL(fill_parallel_info(allocator, param.degree_))) {
215+
LOG_WARN("failed to fill parallel info", K(ret));
214216
} else if (OB_FAIL(ObDbmsStatsUtils::get_valid_duration_time(param.gather_start_time_,
215217
param.max_duration_time_,
216218
duration_time))) {

0 commit comments

Comments
 (0)