floating-point expressions shall not be directly or indirectly tested for equality or inequality
This commit is contained in:
		| @ -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; | ||||
|  | ||||
| @ -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 { | ||||
|  | ||||
| @ -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后会出现不幂等的问题 | ||||
|  | ||||
| @ -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; | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 hnwyllmm
					hnwyllmm