diff --git a/ml/ml_utils.cpp b/ml/ml_utils.cpp index 648cff591..b5f8bd258 100644 --- a/ml/ml_utils.cpp +++ b/ml/ml_utils.cpp @@ -43,6 +43,7 @@ #include "sql/sql_base.h" #include "sql/sql_class.h" #include "sql/table.h" +#include "sql/thd_raii.h" #include "sql/transaction.h" // trans_commit_stmt #include "ml_algorithm.h" @@ -616,6 +617,8 @@ BoosterHandle Utils::load_trained_model_from_string(std::string &model_content) int Utils::update_model_in_catalog(TABLE *table, const std::string &model_handle, size_t field_no, const std::string &field_value) { THD *thd = current_thd; + Disable_binlog_guard binlog_guard(thd); + if (table->file->ha_external_lock(thd, F_WRLCK)) return HA_ERR_GENERIC; if (table->file->inited == handler::NONE && table->file->ha_rnd_init(true)) { diff --git a/storage/rapid_engine/handler/ha_shannon_rapid.cc b/storage/rapid_engine/handler/ha_shannon_rapid.cc index 9d1c22660..a5fba9f3b 100644 --- a/storage/rapid_engine/handler/ha_shannon_rapid.cc +++ b/storage/rapid_engine/handler/ha_shannon_rapid.cc @@ -2753,7 +2753,7 @@ extern bool srv_is_upgrade_mode; extern char mysql_home[FN_REFLEN]; extern char mysql_llm_home[FN_REFLEN]; extern bool opt_initialize; -extern bool opt_upgrade_mode; +extern long opt_upgrade_mode; static int Shannonbase_Rapid_Init(MYSQL_PLUGIN p) { ShannonBase::shannon_loaded_tables = new ShannonBase::LoadedTables(); diff --git a/storage/rapid_engine/optimizer/rules/rule.h b/storage/rapid_engine/optimizer/rules/rule.h index 05f6b7eae..1dbe2723c 100644 --- a/storage/rapid_engine/optimizer/rules/rule.h +++ b/storage/rapid_engine/optimizer/rules/rule.h @@ -31,9 +31,10 @@ #include "storage/rapid_engine/optimizer/query_plan.h" class Query_expression; class Query_block; -class CostEstimator; + namespace ShannonBase { namespace Optimizer { +class CostEstimator; /** * Base class for optimization rules */