[CP] fix write optimizer stats to use the same trans

This commit is contained in:
wangt1xiuyi
2023-07-07 06:18:23 +00:00
committed by ob-robot
parent 0692a9954d
commit a0a29c9034
9 changed files with 85 additions and 78 deletions

View File

@ -17,6 +17,7 @@
#include "share/stat/ob_opt_table_stat.h"
#include "share/stat/ob_stat_define.h"
#include "share/stat/ob_opt_stat_gather_stat.h"
#include "lib/mysqlclient/ob_mysql_transaction.h"
namespace oceanbase {
namespace common {
namespace sqlclient
@ -94,12 +95,14 @@ public:
const ObOptTableStat *tab_stat,
const bool is_index_stat);
int update_table_stat(const uint64_t tenant_id,
ObMySQLTransaction &trans,
const common::ObIArray<ObOptTableStat*> &table_stats,
const int64_t current_time,
const bool is_index_stat,
const bool is_history_stat = false);
int update_column_stat(share::schema::ObSchemaGetterGuard *schema_guard,
const uint64_t exec_tenant_id,
ObMySQLTransaction &trans,
const common::ObIArray<ObOptColumnStat*> &column_stats,
const int64_t current_time,
bool only_update_col_stat = false,