floating-point expressions shall not be directly or indirectly tested for equality or inequality

This commit is contained in:
hnwyllmm 2022-11-25 03:38:33 +00:00 committed by wangzelin.wzl
parent 2f92ff4ea7
commit fc25b8c5d1
6 changed files with 9 additions and 8 deletions

View File

@ -770,7 +770,7 @@ private:
bool redirect_flag_;//whether redirect, TRUE: redirect FALSE: no redirect.
bool open_wf_flag_;//whether open warning log-file.
bool enable_wf_flag_; //whether write waring log to wf log-file.
bool rec_old_file_flag_;//whether recorde old file.
bool rec_old_file_flag_;//whether record old file.
volatile bool can_print_;//when disk has no space, logger control
bool enable_async_log_;//if false, use sync way logging

View File

@ -86,7 +86,7 @@ int ObDBMSMonitor::session_trace_enable(sql::ObExecContext &ctx, sql::ParamStore
OZ (params.at(2).get_number(sample_pct));
OV (params.at(3).is_varchar(), OB_INVALID_ARGUMENT);
OZ (params.at(3).get_string(record_policy));
// add recorde polciy
// add record polciy
sql::ObSQLSessionInfo *sess = NULL;
sql::ObSQLSessionMgr *session_mgr = GCTX.session_mgr_;
FLTControlInfo c_info;

View File

@ -370,7 +370,7 @@ int ObDMLService::process_before_stmt_trigger(const ObDMLBaseCtDef &dml_ctdef,
dml_event))) {
LOG_WARN("failed to handle before stmt trigger", K(ret));
} else if (OB_FAIL(ObSqlTransControl::stmt_refresh_snapshot(dml_rtctx.get_exec_ctx()))) {
LOG_WARN("failed to get new sanpshot after before stmt trigger evaluated", K(ret));
LOG_WARN("failed to get new snapshot after before stmt trigger evaluated", K(ret));
}
}
return ret;

View File

@ -192,10 +192,11 @@ int ObExprMod::mod_double(ObObj &res,
{
int ret = OB_SUCCESS;
const double EPSILON = 1e-14;
if (OB_UNLIKELY(left.get_type_class() != right.get_type_class())) {
ret = OB_INVALID_ARGUMENT;
LOG_WARN("Invalid types", K(ret), K(left), K(right));
} else if (fabs(right.get_double()) == 0.0) {
} else if (fabs(right.get_double()) < EPSILON) {
if (lib::is_oracle_mode()) {
res.set_double(left.get_double());
} else {

View File

@ -2424,7 +2424,7 @@ int ObSql::generate_physical_plan(ParseResult &parse_result,
phy_plan,
result.get_exec_context(),
stmt))) { //rewrite stmt
LOG_WARN("Failed to transforme stmt", K(ret));
LOG_WARN("Failed to transform stmt", K(ret));
} else if (OB_FALSE_IT(optctx.set_root_stmt(stmt))) {
} else if (OB_FAIL(optimize_stmt(optimizer, *(sql_ctx.session_info_),
*stmt, logical_plan))) { //gen logical plan
@ -3705,7 +3705,7 @@ OB_NOINLINE int ObSql::handle_physical_plan(const ObString &trimed_stmt,
ObSQLSessionInfo &session = result.get_session();
ObPlanCache *plan_cache = session.get_plan_cache();
bool use_plan_cache = session.get_local_ob_enable_plan_cache();
// recorde whether needs to do parameterization at this time,
// record whether needs to do parameterization at this time,
// if exact mode is on, not do parameterizaiton
bool is_enable_transform_tree = !session.get_enable_exact_mode();
//重新解析前将这两个标记reset掉,避免前面查plan cache的操作导致这两个参数在重新生成plan后会出现不幂等的问题
@ -4284,7 +4284,7 @@ int ObSql::get_first_batched_multi_stmt(ObMultiStmtItem& multi_stmt_item, ObStri
// ObString outlined_stmt = trimed_stmt;
// bool add_plan_to_pc = false;
// ObSQLSessionInfo &session = result.get_session();
// // recorde whether needs to do parameterization at this time,
// // record whether needs to do parameterization at this time,
// // if exact mode is on, not do parameterizaiton
// bool is_enable_transform_tree = !session.get_enable_exact_mode();
// //重新解析前将这两个标记reset掉,避免前面查plan cache的操作导致这两个参数在重新生成plan后会出现不幂等的问题

View File

@ -629,7 +629,7 @@ int ObSqlTransControl::stmt_refresh_snapshot(ObExecContext &exec_ctx) {
} else if (OB_FAIL(get_tx_service(session, txs))) {
LOG_WARN("failed to get transaction service", K(ret));
} else if (OB_FAIL(stmt_setup_snapshot_(session, das_ctx, plan, plan_ctx, txs))) {
LOG_WARN("failed to set sanpshot", K(ret));
LOG_WARN("failed to set snapshot", K(ret));
}
return ret;
}