diff --git a/deps/oblib/src/lib/container/ob_vector.ipp b/deps/oblib/src/lib/container/ob_vector.ipp index f5c03d7de1..27160ab8ca 100644 --- a/deps/oblib/src/lib/container/ob_vector.ipp +++ b/deps/oblib/src/lib/container/ob_vector.ipp @@ -145,7 +145,7 @@ int ObVector::expand(int64_t size) copy(new_mem, mem_begin_, mem_end_); } - // deallocate old memeory + // deallocate old memory destroy(); mem_begin_ = new_mem; diff --git a/deps/oblib/src/lib/geo/ob_geo_func_box.cpp b/deps/oblib/src/lib/geo/ob_geo_func_box.cpp index 5cd6d6e815..325e756fba 100644 --- a/deps/oblib/src/lib/geo/ob_geo_func_box.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_func_box.cpp @@ -200,7 +200,7 @@ OB_GEO_UNARY_FUNC_BEGIN(ObGeoFuncBoxImpl, ObWkbGeogCollection, ObGeogBox *) if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, true, true, sub_g))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g->set_data(wkb_nosrid); sub_g->set_srid(g->get_srid()); diff --git a/deps/oblib/src/lib/geo/ob_geo_func_correct.cpp b/deps/oblib/src/lib/geo/ob_geo_func_correct.cpp index 2607af4b61..c1947974a6 100644 --- a/deps/oblib/src/lib/geo/ob_geo_func_correct.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_func_correct.cpp @@ -92,7 +92,7 @@ private: if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, IsGeog, true, sub_g))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g->set_data(wkb_nosrid); sub_g->set_srid(g->get_srid()); diff --git a/deps/oblib/src/lib/geo/ob_geo_func_covered_by.cpp b/deps/oblib/src/lib/geo/ob_geo_func_covered_by.cpp index 02630ba5d3..0140fd1349 100644 --- a/deps/oblib/src/lib/geo/ob_geo_func_covered_by.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_func_covered_by.cpp @@ -143,7 +143,7 @@ OB_GEO_CART_BINARY_FUNC_BEGIN(ObGeoFuncCoveredByImpl, ObWkbGeomPoint, ObWkbGeomC if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, false, true, sub_g2))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g2->set_data(wkb_nosrid); sub_g2->set_srid(g2->get_srid()); @@ -636,7 +636,7 @@ OB_GEO_GEOG_BINARY_FUNC_BEGIN(ObGeoFuncCoveredByImpl, ObWkbGeogPoint, ObWkbGeogC if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, true, true, sub_g2))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g2->set_data(wkb_nosrid); sub_g2->set_srid(g2->get_srid()); diff --git a/deps/oblib/src/lib/geo/ob_geo_func_distance.cpp b/deps/oblib/src/lib/geo/ob_geo_func_distance.cpp index fbd5f57637..94d4b42288 100644 --- a/deps/oblib/src/lib/geo/ob_geo_func_distance.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_func_distance.cpp @@ -142,7 +142,7 @@ private: if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, is_geog, true, sub_g1))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g1->set_data(wkb_nosrid); sub_g1->set_srid(g1->get_srid()); @@ -163,7 +163,7 @@ private: if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, is_geog, true, sub_g2))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g2->set_data(wkb_nosrid); sub_g2->set_srid(g2->get_srid()); diff --git a/deps/oblib/src/lib/geo/ob_geo_func_envelope.cpp b/deps/oblib/src/lib/geo/ob_geo_func_envelope.cpp index f9f36b83c9..60e6aacc5b 100644 --- a/deps/oblib/src/lib/geo/ob_geo_func_envelope.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_func_envelope.cpp @@ -74,7 +74,7 @@ private: if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, false, true, sub_g))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g->set_data(wkb_nosrid); sub_g->set_srid(g->get_srid()); diff --git a/deps/oblib/src/lib/geo/ob_geo_func_intersects.cpp b/deps/oblib/src/lib/geo/ob_geo_func_intersects.cpp index 6a1c1f0341..a1e2fe0cd7 100644 --- a/deps/oblib/src/lib/geo/ob_geo_func_intersects.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_func_intersects.cpp @@ -154,7 +154,7 @@ private: if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, is_geog, true, sub_g1))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g1->set_data(wkb_nosrid); sub_g1->set_srid(g1->get_srid()); @@ -173,7 +173,7 @@ private: if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, is_geog, true, sub_g2))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g2->set_data(wkb_nosrid); sub_g2->set_srid(g2->get_srid()); diff --git a/deps/oblib/src/lib/geo/ob_geo_func_isvalid.cpp b/deps/oblib/src/lib/geo/ob_geo_func_isvalid.cpp index f927a1ccb2..bee226d190 100644 --- a/deps/oblib/src/lib/geo/ob_geo_func_isvalid.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_func_isvalid.cpp @@ -101,7 +101,7 @@ private: if (OB_FAIL(ObGeoTypeUtil::create_geo_by_type(*allocator, sub_type, is_geog, true, sub_g))) { LOG_WARN("failed to create wkb", K(ret), K(sub_type)); } else { - // Length is not used, cannot get real length untill iter move to the next + // Length is not used, cannot get real length until iter move to the next ObString wkb_nosrid(WKB_COMMON_WKB_HEADER_LEN, reinterpret_cast(sub_ptr)); sub_g->set_data(wkb_nosrid); sub_g->set_srid(g->get_srid()); diff --git a/deps/oblib/src/lib/thread_local/thread_buffer.cpp b/deps/oblib/src/lib/thread_local/thread_buffer.cpp index 8b24297348..142225339f 100644 --- a/deps/oblib/src/lib/thread_local/thread_buffer.cpp +++ b/deps/oblib/src/lib/thread_local/thread_buffer.cpp @@ -80,7 +80,7 @@ ThreadSpecificBuffer::Buffer *ThreadSpecificBuffer::get_buffer() const ptr = ob_malloc(size_ + sizeof(Buffer), ObModIds::OB_THREAD_BUFFER); if (NULL == ptr) { // malloc failed; - _OB_LOG_RET(ERROR, OB_ALLOCATE_MEMORY_FAILED, "malloc thread specific memeory failed."); + _OB_LOG_RET(ERROR, OB_ALLOCATE_MEMORY_FAILED, "malloc thread specific memory failed."); } else { int ret = pthread_setspecific(key_, ptr); if (0 != ret) { diff --git a/deps/oblib/src/lib/thread_local/thread_buffer.h b/deps/oblib/src/lib/thread_local/thread_buffer.h index f37c33eab4..327ddaf3f6 100644 --- a/deps/oblib/src/lib/thread_local/thread_buffer.h +++ b/deps/oblib/src/lib/thread_local/thread_buffer.h @@ -21,7 +21,7 @@ namespace oceanbase namespace common { /** - * Provide a memeory allocate mechanism by allocate + * Provide a memory allocate mechanism by allocate * a buffer associate with specific thread, whenever * this buffer allocate by user function in a thread * and free when thread exit. diff --git a/src/observer/mysql/obmp_base.cpp b/src/observer/mysql/obmp_base.cpp index b8cf700946..7bd61f70d7 100644 --- a/src/observer/mysql/obmp_base.cpp +++ b/src/observer/mysql/obmp_base.cpp @@ -317,7 +317,7 @@ int ObMPBase::free_session() LOG_INFO("free session successfully", K(ctx)); conn->is_sess_free_ = true; if (OB_UNLIKELY(OB_FAIL(sql::ObSQLSessionMgr::is_need_clear_sessid(conn, is_need_clear)))) { - LOG_ERROR("fail to jugde need clear", K(ret), "sessid", conn->sessid_, "server_id", GCTX.server_id_); + LOG_ERROR("fail to judge need clear", K(ret), "sessid", conn->sessid_, "server_id", GCTX.server_id_); } else if (is_need_clear) { if (OB_FAIL(GCTX.session_mgr_->mark_sessid_unused(conn->sessid_))) { LOG_WARN("mark session id unused failed", K(ret), "sessid", conn->sessid_); diff --git a/src/observer/mysql/obmp_disconnect.cpp b/src/observer/mysql/obmp_disconnect.cpp index a0100ed2ac..2a005b8f1d 100644 --- a/src/observer/mysql/obmp_disconnect.cpp +++ b/src/observer/mysql/obmp_disconnect.cpp @@ -81,7 +81,7 @@ int ObMPDisconnect::run() EVENT_INC(SQL_USER_LOGOUTS_CUMULATIVE); LOG_INFO("free session successfully", "sessid", ctx_.sessid_); if (OB_UNLIKELY(OB_FAIL(sql::ObSQLSessionMgr::is_need_clear_sessid(&conn, is_need_clear)))) { - LOG_ERROR("fail to jugde need clear", K(ret), "sessid", conn.sessid_, "server_id", GCTX.server_id_); + LOG_ERROR("fail to judge need clear", K(ret), "sessid", conn.sessid_, "server_id", GCTX.server_id_); } else if (is_need_clear) { if (OB_FAIL(GCTX.session_mgr_->mark_sessid_unused(conn.sessid_))) { LOG_WARN("mark session id unused failed", K(ret), "sessid", conn.sessid_); diff --git a/src/observer/mysql/obsm_conn_callback.cpp b/src/observer/mysql/obsm_conn_callback.cpp index 7427adf430..171ceabbec 100644 --- a/src/observer/mysql/obsm_conn_callback.cpp +++ b/src/observer/mysql/obsm_conn_callback.cpp @@ -214,7 +214,7 @@ void ObSMConnectionCallback::destroy(ObSMConnection& conn) } } else { if (OB_UNLIKELY(OB_FAIL(sql::ObSQLSessionMgr::is_need_clear_sessid(&conn, is_need_clear)))) { - LOG_ERROR("fail to jugde need clear", K(ret)); + LOG_ERROR("fail to judge need clear", K(ret)); } else if (is_need_clear) { if (OB_FAIL(GCTX.session_mgr_->mark_sessid_unused(conn.sessid_))) { LOG_ERROR("fail to mark sessid unused", K(ret), K(conn.sessid_), diff --git a/src/observer/mysql/obsm_handler.cpp b/src/observer/mysql/obsm_handler.cpp index 55ae9269fa..8546d82410 100644 --- a/src/observer/mysql/obsm_handler.cpp +++ b/src/observer/mysql/obsm_handler.cpp @@ -240,7 +240,7 @@ int ObSMHandler::on_close(easy_connection_t *c) } } else { if (OB_UNLIKELY(OB_FAIL(sql::ObSQLSessionMgr::is_need_clear_sessid(conn, is_need_clear)))) { - LOG_ERROR("fail to jugde need clear", K(ret)); + LOG_ERROR("fail to judge need clear", K(ret)); } else if (is_need_clear) { if (OB_UNLIKELY(OB_FAIL(gctx_.session_mgr_->mark_sessid_unused(conn->sessid_)))) { LOG_ERROR("fail to mark sessid unused", K(ret), K(conn->sessid_), diff --git a/src/observer/virtual_table/ob_tenant_virtual_get_object_definition.cpp b/src/observer/virtual_table/ob_tenant_virtual_get_object_definition.cpp index 24a6bef4a0..4049b6500b 100644 --- a/src/observer/virtual_table/ob_tenant_virtual_get_object_definition.cpp +++ b/src/observer/virtual_table/ob_tenant_virtual_get_object_definition.cpp @@ -319,7 +319,7 @@ int ObGetObjectDefinition::get_constraint_definition(ObString &ddl_str, LOG_WARN("get constraint info failed", K(ret), K(tenant_id), K(database_id), K(constraint_name)); } else if (OB_INVALID_ID == (constraint_id = constraint_info.constraint_id_)) { - // The unique constrant is mocked by a unique index. + // The unique constraint is mocked by a unique index. // If other types of constraint is not exist, we will try to find if the uk exists. // bool is_unique_constraint_exist = false; if (OB_FAIL(schema_guard_->get_idx_schema_by_origin_idx_name( diff --git a/src/sql/optimizer/ob_del_upd_log_plan.cpp b/src/sql/optimizer/ob_del_upd_log_plan.cpp index 637566ac04..d6796c641b 100644 --- a/src/sql/optimizer/ob_del_upd_log_plan.cpp +++ b/src/sql/optimizer/ob_del_upd_log_plan.cpp @@ -1422,7 +1422,7 @@ int ObDelUpdLogPlan::allocate_pdml_insert_as_top(ObLogicalOperator *&top, LOG_WARN("get unexpected null", K(ret)); } if (OB_FAIL(insert_op->compute_property())) { - LOG_WARN("failed to compute propery", K(ret)); + LOG_WARN("failed to compute property", K(ret)); } else { top = insert_op; } diff --git a/src/sql/optimizer/ob_delete_log_plan.cpp b/src/sql/optimizer/ob_delete_log_plan.cpp index 6370f5d369..ece94a3ae0 100644 --- a/src/sql/optimizer/ob_delete_log_plan.cpp +++ b/src/sql/optimizer/ob_delete_log_plan.cpp @@ -275,7 +275,7 @@ int ObDeleteLogPlan::allocate_delete_as_top(ObLogicalOperator *&top, } else if (delete_stmt->is_error_logging() && OB_FAIL(delete_op->extract_err_log_info())) { LOG_WARN("failed to extract error log info", K(ret)); } else if (OB_FAIL(delete_op->compute_property())) { - LOG_WARN("failed to compute propery", K(ret)); + LOG_WARN("failed to compute property", K(ret)); } else { top = delete_op; } diff --git a/src/sql/optimizer/ob_optimizer.cpp b/src/sql/optimizer/ob_optimizer.cpp index fab40909fc..3ae9c81881 100644 --- a/src/sql/optimizer/ob_optimizer.cpp +++ b/src/sql/optimizer/ob_optimizer.cpp @@ -1101,7 +1101,7 @@ int ObOptimizer::update_column_usage_infos() LOG_WARN("get unexpected null", K(ret), K(optstat_monitor_mgr)); } else if (OB_FAIL(optstat_monitor_mgr->update_local_cache(ctx_.get_column_usage_infos()))) { LOG_WARN("failed to update local cache", K(ret)); - } else {/*do nothiing*/} + } else {/*do nothing*/} } } return ret; diff --git a/src/sql/optimizer/ob_update_log_plan.cpp b/src/sql/optimizer/ob_update_log_plan.cpp index 126288324a..d19baad82e 100644 --- a/src/sql/optimizer/ob_update_log_plan.cpp +++ b/src/sql/optimizer/ob_update_log_plan.cpp @@ -157,7 +157,7 @@ int ObUpdateLogPlan::generate_normal_raw_plan() if (OB_FAIL(candi_allocate_sequence())) { LOG_WARN("failed to allocate sequence operator", K(ret)); } else { - LOG_TRACE("succeed to allocate sequance operator", + LOG_TRACE("succeed to allocate sequence operator", K(candidates_.candidate_plans_.count())); } } @@ -212,7 +212,7 @@ int ObUpdateLogPlan::generate_normal_raw_plan() if (OB_FAIL(candi_allocate_update())) { LOG_WARN("failed to allocate update operator", K(ret)); } else { - LOG_TRACE("succeed to allocate normal update opeartor", + LOG_TRACE("succeed to allocate normal update operator", K(candidates_.candidate_plans_.count())); } } @@ -369,7 +369,7 @@ int ObUpdateLogPlan::allocate_update_as_top(ObLogicalOperator *&top, ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("failed to allocate update operator", K(ret)); } else if (OB_FAIL(update_op->assign_dml_infos(index_dml_infos_))) { - LOG_WARN("failed to assgin dml infos", K(ret)); + LOG_WARN("failed to assign dml infos", K(ret)); } else { update_op->set_child(ObLogicalOperator::first_child, top); update_op->set_ignore(update_stmt->is_ignore()); @@ -411,7 +411,7 @@ int ObUpdateLogPlan::candi_allocate_pdml_update() IndexDMLInfo *index_delete_info = nullptr; IndexDMLInfo *index_insert_info = nullptr; // 更新了当前索引的分区键,需要做 row-movement - // 需要为每一个globa index以及primary index分配各自的 update operator,形成如下的计划: + // 需要为每一个global index以及primary index分配各自的 update operator,形成如下的计划: // .... // INSERT INDEX (i3) // DELETE INDEX (i3) @@ -440,7 +440,7 @@ int ObUpdateLogPlan::candi_allocate_pdml_update() } } else { // 在PDML update中,可能包含有多个global index, - // 需要为每一个globa index以及primary index分配各自的 update operator,形成如下的计划: + // 需要为每一个global index以及primary index分配各自的 update operator,形成如下的计划: // .... // UPDATE INDEX (i3) // UPDATE INDEX (i2) @@ -475,7 +475,7 @@ int ObUpdateLogPlan::perform_vector_assign_expr_replacement(ObUpdateStmt *stmt) if (OB_FAIL(replace_alias_ref_expr(value, replace_happened))) { LOG_WARN("failed to replace alias ref expr", K(ret)); } else if (replace_happened && OB_FAIL(value->formalize(session_info))) { - LOG_WARN("failed to foramlize expr", K(ret)); + LOG_WARN("failed to formalize expr", K(ret)); } } } @@ -624,7 +624,7 @@ int ObUpdateLogPlan::prepare_table_dml_info_special(const ObDmlTableInfo& table_ LOG_WARN("failed to get table schema", K(table_info), K(ret)); } else if (!table_info.is_link_table_ && OB_FAIL(check_update_part_key(index_schema, table_dml_info))) { - LOG_WARN("faield to check update part key", K(ret)); + LOG_WARN("failed to check update part key", K(ret)); } else { for (int64_t i = 0; OB_SUCC(ret) && i < table_dml_info->ck_cst_exprs_.count(); ++i) { if (OB_FAIL(ObDMLResolver::copy_schema_expr(optimizer_context_.get_expr_factory(), @@ -677,7 +677,7 @@ int ObUpdateLogPlan::prepare_table_dml_info_special(const ObDmlTableInfo& table_ LOG_WARN("failed to check update unique key", K(ret)); } else if (!table_info.is_link_table_ && OB_FAIL(check_update_part_key(index_schema, index_dml_info))) { - LOG_WARN("faield to check update part key", K(ret)); + LOG_WARN("failed to check update part key", K(ret)); } else if (OB_FAIL(index_dml_infos.push_back(index_dml_info))) { LOG_WARN("failed to push back index dml info", K(ret)); } diff --git a/src/sql/parser/ob_parser.h b/src/sql/parser/ob_parser.h index ce769a14fe..8452003d73 100644 --- a/src/sql/parser/ob_parser.h +++ b/src/sql/parser/ob_parser.h @@ -77,7 +77,7 @@ public: // situation we will try find ';' delimiter to parser part of string in case of save memory, // but this maybe parser error and throw error info. However, we will still try parser remain // string when parse part of string failed, if we throw parse part error info, maybe will let - // someone misunderstand have bug, So, we introduce this mark to decide to throw parser erorr. + // someone misunderstand have bug, So, we introduce this mark to decide to throw parser error. // eg: select '123;' from dual; select '123' from dual; int parse_sql(const common::ObString &stmt, ParseResult &parse_result, diff --git a/src/sql/parser/parse_malloc.cpp b/src/sql/parser/parse_malloc.cpp index bb817a188f..ba334d0a88 100644 --- a/src/sql/parser/parse_malloc.cpp +++ b/src/sql/parser/parse_malloc.cpp @@ -33,7 +33,7 @@ void *malloc_parentheses_info(const size_t nbyte, void *malloc_pool) return ptr; } -// get memory from the thread obStringBuf, and not release untill thread quits +// get memory from the thread obStringBuf, and not release until thread quits void *parse_malloc(const size_t nbyte, void *malloc_pool) { void *ptr = NULL; diff --git a/src/sql/parser/parse_node.c b/src/sql/parser/parse_node.c index 9c167828fa..afb3174df6 100644 --- a/src/sql/parser/parse_node.c +++ b/src/sql/parser/parse_node.c @@ -720,7 +720,7 @@ int64_t get_question_mark(ObQuestionMarkCtx *ctx, void *malloc_pool, const char } else { if (NULL == ctx->name_ && 0 == ctx->capacity_) { ctx->capacity_ = MAX_QUESTION_MARK; - // the errocde will be ignored here. TO BE FIXED. + // the errcode will be ignored here. TO BE FIXED. ctx->name_ = (char **)parse_malloc(sizeof(char*) * MAX_QUESTION_MARK, malloc_pool); } if (ctx->name_ != NULL) { diff --git a/src/sql/parser/parse_node.h b/src/sql/parser/parse_node.h index 3fc9149705..9d84eb2229 100644 --- a/src/sql/parser/parse_node.h +++ b/src/sql/parser/parse_node.h @@ -131,8 +131,8 @@ typedef struct _ParseNode uint32_t is_neg_ : 1;// 记录常量节点的父节点是否为T_OP_NEG节点, 1表示是, 0 表示不是 uint32_t is_hidden_const_ : 1; //1 表示某常量正常parse能识别但fast parse不能识别, 0 表示都能识别。 uint32_t is_tree_not_param_ :1; //1 表示该节点及其子节点常量均不能参数化, 0表示没该限制 - uint32_t length_semantics_ :2; //2 for oralce [char|varbinary] (n b [bytes|char]) - uint32_t is_val_paramed_item_idx_ :1; // T_PROJECT_STRING的vlaues是否是select_item_param_infos数组的下标 + uint32_t length_semantics_ :2; //2 for oracle [char|varbinary] (n b [bytes|char]) + uint32_t is_val_paramed_item_idx_ :1; // T_PROJECT_STRING的values是否是select_item_param_infos数组的下标 uint32_t is_copy_raw_text_ : 1; // 是否回填常量节点的raw_text_,用于select item常量参数化 uint32_t is_column_varchar_ : 1; // 投影列是否是一个常量字符串,用于select item常量参数化 uint32_t is_trans_from_minus_: 1; // 负数常量节点是否是从减号操作转换而来,比如1 - 2,词法阶段会生成一个-2 @@ -174,7 +174,7 @@ typedef struct _ParseNode int64_t text_len_; int64_t pos_; //记录?在带?的sql中的偏移 - struct _ParseNode **children_; /* attributes for non-terninal node, which has children */ + struct _ParseNode **children_; /* attributes for non-terminal node, which has children */ ObStmtLoc stmt_loc_; //临时放在这里,后面要移到parse_stmt_node.h中去 union { int64_t raw_param_idx_; // 常量节点在fp_result.raw_params_中的下标 @@ -243,7 +243,7 @@ typedef struct _ObQuestionMarkCtx // record the minus status while parsing the sql // for example, 'select - -1 from dual' // when parser sees the first '-', pos_ = 7, raw_sql_offset = 7, has_minus_ = true, is_cur_numeric_ = false -// after seeing the second '-', members are reseted, pos_ = 9, raw_sql_offset_ = 9, has_minus_ = true, is_cur_numberic = false +// after seeing the second '-', members are reseted, pos_ = 9, raw_sql_offset_ = 9, has_minus_ = true, is_cur_numeric = false // after seeing '1', is_cur_numeric = true, then param node '-1' is returned typedef struct _ObMinusStatuCtx { diff --git a/src/sql/parser/sql_parser_base.h b/src/sql/parser/sql_parser_base.h index fc39f3424f..ed219780e9 100644 --- a/src/sql/parser/sql_parser_base.h +++ b/src/sql/parser/sql_parser_base.h @@ -240,7 +240,7 @@ do { setup_token_pos_info(node, word_start - 1, word_end - word_start + 1); \ } while (0) -//oralce下生成非保留关键字结点请使用该宏,区别于mysql的是做了大写的转换 +//oracle下生成非保留关键字结点请使用该宏,区别于mysql的是做了大写的转换 #define get_oracle_non_reserved_node(node, malloc_pool, expr_start, expr_end) \ do { \ malloc_terminal_node(node, malloc_pool, T_IDENT); \ diff --git a/src/sql/resolver/cmd/ob_load_data_resolver.cpp b/src/sql/resolver/cmd/ob_load_data_resolver.cpp index c757fa0746..90417b9b22 100644 --- a/src/sql/resolver/cmd/ob_load_data_resolver.cpp +++ b/src/sql/resolver/cmd/ob_load_data_resolver.cpp @@ -269,7 +269,7 @@ int ObLoadDataResolver::resolve(const ParseNode &parse_tree) } else { load_args.combined_name_.assign_ptr(buf, pos); } - LOG_DEBUG("resovle table info result", K(tenant_id), K(database_name), K(table_name)); + LOG_DEBUG("resolve table info result", K(tenant_id), K(database_name), K(table_name)); } } @@ -907,7 +907,7 @@ int ObLoadDataResolver::resolve_column_ref_expr(ObIArray &colum * This function examines subqueries in set clause recursively, * and ensures that no subquery read data from the loaded table. * - * Call deepth has already examined in subquery resolving phase, + * Call depth has already examined in subquery resolving phase, * don't need to do it again */ int recursively_check_subquery_tables(ObSelectStmt *subquery_stmt, uint64_t loaded_table_id) @@ -1180,7 +1180,7 @@ int ObLoadDataResolver::check_if_table_exists(uint64_t tenant_id, LOG_WARN("fail to check table or index exist", K(tenant_id), K(database_id), K(table_name), K(ret)); } else if (!is_table_exist) { - //a alias table is impossiable + //a alias table is impossible //TODO wjh: support synonym tables, return not exist for now //see ObDMLResolver::resolve_table_relation_recursively ret = OB_TABLE_NOT_EXIST; @@ -1192,7 +1192,7 @@ int ObLoadDataResolver::check_if_table_exists(uint64_t tenant_id, cte_table_fisrt, is_hidden, tschema))) { - //it's possiable to get "table not exist" ret here + //it's possible to get "table not exist" ret here LOG_WARN("get table schema failed", K(ret)); } else { table_id = tschema->get_table_id(); diff --git a/src/sql/resolver/ddl/ob_create_table_resolver.cpp b/src/sql/resolver/ddl/ob_create_table_resolver.cpp index c7ad995d14..923037eb3e 100644 --- a/src/sql/resolver/ddl/ob_create_table_resolver.cpp +++ b/src/sql/resolver/ddl/ob_create_table_resolver.cpp @@ -95,7 +95,7 @@ int ObCreateTableResolver::add_primary_key_part(const ObString &column_name, } else if (static_cast(table_id_) > 0 && OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_table_id( session_info_->get_effective_tenant_id(), table_id_, is_oracle_mode))) { - LOG_WARN("fail to check oralce mode", KR(ret), K_(table_id)); + LOG_WARN("fail to check oracle mode", KR(ret), K_(table_id)); } else { ObColumnSchemaV2 *col = NULL; ObTableSchema &table_schema = create_table_stmt->get_create_table_arg().schema_; @@ -767,7 +767,7 @@ int ObCreateTableResolver::resolve(const ParseNode &parse_tree) // Oracle 官方文档关于 references 权限的描述非常少。 // 文档中比较重要的一条是“references 权限不能被授予给角色”, // 再加上测试的结果,所以我们推测references权限进行检查时, - // 检查的不是当前用户是否具有refernces权限,而是去检查子表所在的schema有没有references的权限。 + // 检查的不是当前用户是否具有references权限,而是去检查子表所在的schema有没有references的权限。 // 所以现在的逻辑是 // 1. 当子表和父表相同时,无需检查 // 2. 当子表和父表同属一个schema时,也无需检查,这一点已经在oracle上验证了。 @@ -963,7 +963,7 @@ int ObCreateTableResolver::resolve_partition_option( } if (OB_SUCC(ret) && (OB_NOT_NULL(node) || is_oracle_temp_table_)) { if (OB_FAIL(check_generated_partition_column(table_schema))) { - LOG_WARN("Failed to check generate partiton column", K(ret)); + LOG_WARN("Failed to check generate partition column", K(ret)); } else if (OB_FAIL(table_schema.check_primary_key_cover_partition_column())) { SQL_RESV_LOG(WARN, "fail to check primary key cover partition column", K(ret)); } else if (OB_FAIL(table_schema.check_auto_partition_valid())) { @@ -1202,7 +1202,7 @@ int ObCreateTableResolver::resolve_table_elements(const ParseNode *node, } else if (static_cast(table_id_) > 0 && OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_table_id( session_info_->get_effective_tenant_id(), table_id_, is_oracle_mode))) { - LOG_WARN("fail to check oralce mode", KR(ret), K_(table_id)); + LOG_WARN("fail to check oracle mode", KR(ret), K_(table_id)); } else { ObSEArray gen_col_expr_arr; ParseNode *primary_node = NULL; @@ -1215,7 +1215,7 @@ int ObCreateTableResolver::resolve_table_elements(const ParseNode *node, table_schema.set_tenant_id(tenant_id); bool has_visible_col = false; // 将经过 resolve_column_definition 后的 column schema 存放在 resolved_cols 中 - // 为了支持生成列按照任意顺序定义,在生成全部 column_schema 之后,再按照统一存放到 table_schma 中 + // 为了支持生成列按照任意顺序定义,在生成全部 column_schema 之后,再按照统一存放到 table_schema 中 ObSEArray resolved_cols; //列需要根据租户id区分大小写,这里先把租户id设置进table_schema if (RESOLVE_NON_COL != resolve_rule) { @@ -1674,7 +1674,7 @@ int ObCreateTableResolver::set_nullable_for_cta_column(ObSelectStmt *select_stmt column.set_nullable(!is_not_null); } } else { //mysql mode - if (expr->is_win_func_expr()) {//compatiable with mysql + if (expr->is_win_func_expr()) {//compatible with mysql const ObWinFunRawExpr *win_expr = reinterpret_cast(expr); if (T_WIN_FUN_RANK == win_expr->get_func_type() || T_WIN_FUN_DENSE_RANK == win_expr->get_func_type() || @@ -2510,7 +2510,7 @@ int ObCreateTableResolver::resolve_index_node(const ParseNode *node) } else if (static_cast(table_id_) > 0 && OB_FAIL(ObCompatModeGetter::check_is_oracle_mode_with_table_id( session_info_->get_effective_tenant_id(), table_id_, is_oracle_mode))) { - LOG_WARN("fail to check oralce mode", KR(ret), K_(table_id)); + LOG_WARN("fail to check oracle mode", KR(ret), K_(table_id)); } else { index_arg_.reset(); ObColumnSortItem sort_item; diff --git a/src/sql/resolver/ddl/ob_create_table_resolver.h b/src/sql/resolver/ddl/ob_create_table_resolver.h index f3b2568904..fa9f7a928a 100644 --- a/src/sql/resolver/ddl/ob_create_table_resolver.h +++ b/src/sql/resolver/ddl/ob_create_table_resolver.h @@ -107,7 +107,7 @@ private: const ParseNode* node, ObArray &constraint_position_list); int build_partition_key_info(share::schema::ObTableSchema &table_schema, const bool is_subpart); - //resolve partitoin option only used in ObCreateTableResolver now. + //resolve partition option only used in ObCreateTableResolver now. int resolve_partition_option(ParseNode *node, share::schema::ObTableSchema &table_schema, const bool is_partition_option_node_with_opt); @@ -122,7 +122,7 @@ private: int add_new_indexkey_for_oracle_temp_table(const int32_t org_key_len); int add_pk_key_for_oracle_temp_table(ObArray &stats, int64_t &pk_data_length); int set_partition_info_for_oracle_temp_table(share::schema::ObTableSchema &table_schema); - // following four functions should be used only in oralce mode + // following four functions should be used only in oracle mode int generate_primary_key_name_array(const share::schema::ObTableSchema &table_schema, ObIArray &pk_columns_name); int generate_uk_idx_array(const ObIArray &index_arg_list, ObIArray &uk_idx_in_index_arg_list); bool is_pk_uk_duplicate(const ObIArray &pk_columns_name, const ObIArray &index_arg_list, const ObIArray &uk_idx); diff --git a/src/sql/resolver/dml/ob_insert_resolver.cpp b/src/sql/resolver/dml/ob_insert_resolver.cpp index f221959c17..6318462c4a 100644 --- a/src/sql/resolver/dml/ob_insert_resolver.cpp +++ b/src/sql/resolver/dml/ob_insert_resolver.cpp @@ -200,7 +200,7 @@ int ObInsertResolver::resolve_insert_clause(const ParseNode &node) insert_stmt->get_insert_table_info().ref_table_id_, insert_stmt->get_insert_table_info().table_id_, insert_stmt))) { - LOG_WARN("failed to add new column for oralce label security table", K(ret)); + LOG_WARN("failed to add new column for oracle label security table", K(ret)); } else if (!has_tg && OB_FAIL(generate_autoinc_params(insert_stmt->get_insert_table_info()))) { LOG_WARN("failed to save autoinc params", K(ret)); } else if (OB_FAIL(generate_column_conv_function(insert_stmt->get_insert_table_info()))) { @@ -491,7 +491,7 @@ int ObInsertResolver::resolve_insert_assign(const ParseNode &assign_list) //add column_item if (OB_ISNULL(assign.column_expr_)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("invalid assginment variable", K(i), K(j), K(assign)); + LOG_WARN("invalid assignment variable", K(i), K(j), K(assign)); } else if (assign.is_duplicated_) { ret = OB_ERR_FIELD_SPECIFIED_TWICE; LOG_USER_ERROR(OB_ERR_FIELD_SPECIFIED_TWICE, to_cstring(assign.column_expr_->get_column_name())); @@ -1075,7 +1075,7 @@ int ObInsertResolver::try_expand_returning_exprs() int ret = OB_SUCCESS; ObInsertStmt *insert_stmt = NULL; // we do not need expand returning expr in prepare stage because we resolve - // it twice, first in prepare stage, second in actural execution. We can only + // it twice, first in prepare stage, second in actual execution. We can only // do it in second stage // Otherwise if we expand in prepare stage, which will pollute our spell SQL // then got a wrong result @@ -1090,7 +1090,7 @@ int ObInsertResolver::try_expand_returning_exprs() for (int64_t i = 0; OB_SUCC(ret) && i < insert_stmt->get_returning_exprs().count(); i++) { for (int64_t j = 0; OB_SUCC(ret) && j < table_columns.count(); j++) { if (table_columns.at(j)->is_xml_column()) { - // do nothing and will rewrite in trnsform stage + // do nothing and will rewrite in transform stage } else { OZ(ObRawExprUtils::replace_ref_column(insert_stmt->get_returning_exprs().at(i), table_columns.at(j), diff --git a/src/sql/resolver/dml/ob_update_resolver.cpp b/src/sql/resolver/dml/ob_update_resolver.cpp index 5386e88f8d..50aa902b25 100644 --- a/src/sql/resolver/dml/ob_update_resolver.cpp +++ b/src/sql/resolver/dml/ob_update_resolver.cpp @@ -172,7 +172,7 @@ int ObUpdateResolver::resolve(const ParseNode &parse_tree) LOG_WARN("failed to resolve error logging", K(ret)); } else if (is_mysql_mode() && !update_stmt->is_ignore() && OB_FAIL(check_join_update_conflict())) { - LOG_WARN("failed to check join update confilct", K(ret)); + LOG_WARN("failed to check join update conflict", K(ret)); } else if (OB_FAIL(update_stmt->formalize_stmt(session_info_))) { LOG_WARN("pull update stmt all expr relation ids failed", K(ret)); } else { /*do nothing*/ } @@ -184,7 +184,7 @@ int ObUpdateResolver::resolve(const ParseNode &parse_tree) } else if (OB_FAIL(update_stmt->check_dml_need_filter_null())) { LOG_WARN("failed to check dml need filter null", K(ret)); } else if (lib::is_mysql_mode() && OB_FAIL(check_safe_update_mode(update_stmt))) { - LOG_WARN("failed to check fullfill safe update mode", K(ret)); + LOG_WARN("failed to check fulfill safe update mode", K(ret)); } else { /*do nothing*/ } } return ret; @@ -195,7 +195,7 @@ int ObUpdateResolver::try_expand_returning_exprs() int ret = OB_SUCCESS; ObUpdateStmt *update_stmt = NULL; // we do not need expand returing expr in prepare stage because we resolve - // it twice, first in prepare stage, second in actural execution. We can only + // it twice, first in prepare stage, second in actual execution. We can only // do it in second stage // Otherwise if we expand in prepare stage, which will pollute our spell SQL // then got a wrong result @@ -227,7 +227,7 @@ int ObUpdateResolver::try_expand_returning_exprs() LOG_WARN("failed to add uncopy exprs", K(ret)); } else if (OB_FAIL(copier.copy_on_replace(update_stmt->get_returning_exprs(), update_stmt->get_returning_exprs()))) { - LOG_WARN("failed to copy on repalce returning exprs", K(ret)); + LOG_WARN("failed to copy on replace returning exprs", K(ret)); } } } diff --git a/src/sql/rewrite/ob_query_range.cpp b/src/sql/rewrite/ob_query_range.cpp index 2a1bd43d3a..8527c9ec78 100644 --- a/src/sql/rewrite/ob_query_range.cpp +++ b/src/sql/rewrite/ob_query_range.cpp @@ -196,7 +196,7 @@ int ObQueryRange::init_query_range_ctx(ObIAllocator &allocator, LOG_WARN("expr result type is null", K(ret)); } else if (OB_ISNULL(ptr = allocator.alloc(sizeof(ObKeyPartPos)))) { ret = OB_ALLOCATE_MEMORY_FAILED; - LOG_WARN("failed to allocate memeory for ObKeyPartPos", K(ret)); + LOG_WARN("failed to allocate memory for ObKeyPartPos", K(ret)); } else { ObExprResType tmp_expr_type = *expr_res_type; if (tmp_expr_type.is_lob_locator()) { @@ -972,7 +972,7 @@ int ObQueryRange::refine_large_range_graph(ObKeyPart *&key_part, bool use_in_opt } else { new_key->id_ = key_part->id_; key_part = new_key; - LOG_TRACE("refine lagre query range with full key", K(cur_range_size)); + LOG_TRACE("refine large query range with full key", K(cur_range_size)); } } else if (OB_ISNULL(first_keypart = pre_key_parts.at(0))) { ret = OB_ERR_UNEXPECTED; @@ -985,7 +985,7 @@ int ObQueryRange::refine_large_range_graph(ObKeyPart *&key_part, bool use_in_opt LOG_WARN("remove precise range expr failed", K(ret)); } else { // remove key part after pre key parts - LOG_TRACE("refine lagre query range remove some key parts", + LOG_TRACE("refine large query range remove some key parts", K(cur_range_size), K(redundant_offset)); ObKeyPart *cur = NULL;; ObKeyPart *and_next = NULL; @@ -1800,7 +1800,7 @@ int ObQueryRange::get_column_key_part(const ObRawExpr *l_expr, } else if(OB_FAIL(ObQueryRange::is_precise_like_range(val, escape_ch, query_range_ctx_->cur_expr_is_precise_))) { - LOG_WARN("failed to jugde whether is precise", K(ret)); + LOG_WARN("failed to judge whether is precise", K(ret)); } else if (OB_FAIL(add_precise_constraint(const_expr, query_range_ctx_->cur_expr_is_precise_))) { LOG_WARN("failed to add precise constraint", K(ret)); @@ -2261,7 +2261,7 @@ int ObQueryRange::get_like_const_range(const ObRawExpr *text_expr, // Under this kind of case, in fact we can ignore the second item and do next // 2) not real true, row(k1, k2, k2)>=(1, k1, 4), "k2>=k1" is run-time defined, // we can not know during parser, so true is returned. -// under this case, we can not ignore it. (k1=1 and k2=3) satisfied this condtion, +// under this case, we can not ignore it. (k1=1 and k2=3) satisfied this condition, // but not satisfied row(k1, k2)>=(1, 4) // we can not distinguish them, so do not do next. // 2. if item is always false, no need to do next @@ -2967,7 +2967,7 @@ int ObQueryRange::prepare_multi_in_info(const ObOpRawExpr *l_expr, ret = OB_ERR_UNEXPECTED; LOG_WARN("get unexpected null", K(ret), K(l_expr), K(r_expr)); } else if (OB_UNLIKELY(l_expr->get_param_count() > MAX_EXTRACT_IN_COLUMN_NUMBER)) { - // do nothiing + // do nothing } else if (OB_FAIL(idx_pos_map.create(l_expr->get_param_count(), "IdxKeyMap", "IdxKeyMap"))) { LOG_WARN("fail to init hashmap", K(ret)); } else if (OB_FAIL(idx_param_map.create(l_expr->get_param_count(), "IdxParamMap", "IdxParamMap"))) { @@ -3553,7 +3553,7 @@ int ObQueryRange::set_geo_keypart_whole_range(ObKeyPart &out_key_part) ret = OB_ERR_UNEXPECTED; LOG_WARN("normal keypart is null", K(ret)); } else { - // set whole range when cosnt expr calculate failed in constant fold + // set whole range when const expr calculate failed in constant fold out_key_part.normal_keypart_->start_.set_min_value(); out_key_part.normal_keypart_->end_.set_max_value(); out_key_part.normal_keypart_->always_false_ = false; @@ -4248,7 +4248,7 @@ int ObQueryRange::intersect_border_from(const ObKeyPart *l_key_part, end_border_type = OB_FROM_RIGHT; } else if (cmp < 0) { end_border_type = OB_FROM_LEFT; - } else { // euqal + } else { // equal if (NULL == l_key_part->and_next_) { end_border_type = OB_FROM_LEFT; // lucky left } @@ -4414,7 +4414,7 @@ int ObQueryRange::set_partial_row_border( // // ROW(k1(s1, e1), k2(s2, e2)) and ROW(k1(s3, e4), k2(s3, e4)) // k1(s1, e1): means the first key part in row between s1 and e1. -// because the and operands is row, we can not AND each key part separtely. +// because the and operands is row, we can not AND each key part separately. // so the result is: // ROW(k1(ns1, ne1), k2(ns2, ne2)), if two row values has intersection. // if s1>s3, ns1 = s1 and ns2 = s2 else ns1 = s3 and ns2 = s4; @@ -4547,7 +4547,7 @@ int ObQueryRange::do_row_gt_and(ObKeyPart *l_gt, ObKeyPart *r_gt, ObKeyPart *&r // AND single key part (itself) and items in item_next_ list -// Each item in item_next_ list must be unkown item untill physical plan open +// Each item in item_next_ list must be unkown item until physical plan open // // E.g. // (A1 and ?1 and ?2 and ... and ?m) and (A2 and ?I and ?II and ... and ?n) @@ -4899,7 +4899,7 @@ int ObQueryRange::and_single_gt_head_graphs( l_and_next = l_cur_gt; } else { // l_cur_gt and r_cur_gt belongs to same key if (OB_FAIL(do_gt_and(l_cur_gt, r_cur_gt, tmp_result))) { - LOG_WARN("Do AND of gerneral term failed", K(ret)); + LOG_WARN("Do AND of general term failed", K(ret)); } } if (OB_FAIL(ret)) { @@ -6193,7 +6193,7 @@ int ObQueryRange::generate_single_range(ObSearchState &search_state, LOG_ERROR("alloc memory for end_obj failed", K(ret)); } else { int64_t max_pred_index = search_state.max_exist_index_; - column_num = search_state.is_phy_rowid_range_ ? 1 : column_num;//physcial rowid range just use only one column + column_num = search_state.is_phy_rowid_range_ ? 1 : column_num;//physical rowid range just use only one column for (int i = 0; OB_SUCC(ret) && i < column_num; i++) { new(start + i) ObObj(); new(end + i) ObObj(); @@ -6377,7 +6377,7 @@ int ObQueryRange::and_first_search(ObSearchState &search_state, } // 3. to check if need to output - //copy_produec_range的作用是控制range能不能够输出,不是所有递归到最后都能输出 + //copy_produce_range的作用是控制range能不能够输出,不是所有递归到最后都能输出 //例如:a>1 and a<=2 and ((b>1 and b < 2) or (b > 4, and b < 5)) //这个例子不能抽成两段range,只能抽成一段range //因为如果抽成两段range->(1, max;2, 2) or (1, max;2, 5)这两段区间是有重叠的 @@ -7480,7 +7480,7 @@ int ObQueryRange::get_like_range(const ObObj &pattern, return ret; } -// Generaal term: if one or more same key parts with OR realtion have same and_next_, +// General term: if one or more same key parts with OR relation have same and_next_, // we call them general term(GT) // E.g. // A and B, A is GT @@ -8498,7 +8498,7 @@ bool ObQueryRange::check_like_range_precise(const ObString &pattern_str, if ((end_with_percent || match_without_wildcard) && (-1 == last_equal_idx || pattern_str_buf[last_equal_idx] != ' ')) { if (!is_oracle_mode() && match_without_wildcard) { - // in mysql, all operater will ignore trailing spaces except like. + // in mysql, all operator will ignore trailing spaces except like. // for example, 'abc ' = 'abc' is true, but 'abc ' like 'abc' is false } else { is_precise = true; diff --git a/src/sql/rewrite/ob_query_range.h b/src/sql/rewrite/ob_query_range.h index edc9e4a79f..f5799de10b 100644 --- a/src/sql/rewrite/ob_query_range.h +++ b/src/sql/rewrite/ob_query_range.h @@ -357,10 +357,10 @@ public: void reset(); - // preliminary_extract_query_range will prelininary extract query range + // preliminary_extract_query_range will preliminary extract query range // from query conditions, which is only occurred in generating the physical plan. // During this stage, some consts are not really known, for example, - // prepared params, session variables, global variables, now(), curret_timestamp(), + // prepared params, session variables, global variables, now(), current_timestamp(), // utc_timestamp, etc.. // final extraction may be need in physical plan open. @@ -399,14 +399,14 @@ public: const bool use_in_optimization = false); // final_extract_query_range extracts the final query range of its physical plan. - // It will get the real-time value of some const which are unknow during physical plan generating. + // It will get the real-time value of some const which are unknown during physical plan generating. // Query range can not be used until this function is called. int final_extract_query_range(ObExecContext &exec_ctx, const common::ObDataTypeCastParams &dtc_params); // get_tablet_ranges gets range of a index. - // This function can not be used untill physical plan is opened. + // This function can not be used until physical plan is opened. virtual int get_tablet_ranges(ObQueryRangeArray &ranges, bool &all_single_value_ranges, diff --git a/src/sql/rewrite/ob_transform_aggr_subquery.h b/src/sql/rewrite/ob_transform_aggr_subquery.h index cd239317b3..8fbf151547 100644 --- a/src/sql/rewrite/ob_transform_aggr_subquery.h +++ b/src/sql/rewrite/ob_transform_aggr_subquery.h @@ -75,7 +75,7 @@ private: ObSEArray is_null_prop_; // need case when for a expr ObArray not_null_const_; int64_t pullup_flag_; // the methods uesd when pulling up the ja query - ObRawExpr *not_null_expr_; // not null expr of subquery if corelated join happened + ObRawExpr *not_null_expr_; // not null expr of subquery if correlated join happened ObRawExpr *parent_expr_of_query_ref; // parent expr need to be modified for vector subquery comparison bool limit_for_exists_; int64_t limit_value_; diff --git a/src/sql/rewrite/ob_transform_count_to_exists.cpp b/src/sql/rewrite/ob_transform_count_to_exists.cpp index 58786aca7e..34447dd3b6 100644 --- a/src/sql/rewrite/ob_transform_count_to_exists.cpp +++ b/src/sql/rewrite/ob_transform_count_to_exists.cpp @@ -51,7 +51,7 @@ int ObTransformCountToExists::transform_one_stmt(common::ObIArrayget_condition_exprs()))) { - LOG_WARN("failed to assgin where condition exprs", K(ret)); + LOG_WARN("failed to assign where condition exprs", K(ret)); } else if (OB_FAIL(collect_trans_params(stmt, cond_exprs, trans_params))) { LOG_WARN("failed to transform count to exists", K(ret)); } else if (trans_params.empty()) { diff --git a/src/sql/rewrite/ob_transform_left_join_to_anti.cpp b/src/sql/rewrite/ob_transform_left_join_to_anti.cpp index a0c6384252..fc86dd1055 100644 --- a/src/sql/rewrite/ob_transform_left_join_to_anti.cpp +++ b/src/sql/rewrite/ob_transform_left_join_to_anti.cpp @@ -315,7 +315,7 @@ int ObTransformLeftJoinToAnti::trans_stmt_to_anti(ObDMLStmt *stmt, JoinedTable * } } // do in-place modification - // a shared expr in semi_condition may be modified by the above replacemenet, + // a shared expr in semi_condition may be modified by the above replacement, // we revert the replacement in the following. if (OB_SUCC(ret)) { ObRawExprCopier copier(*ctx_->expr_factory_); @@ -337,7 +337,7 @@ int ObTransformLeftJoinToAnti::trans_stmt_to_anti(ObDMLStmt *stmt, JoinedTable * } else if (OB_FAIL(stmt->update_column_item_rel_id())) { LOG_WARN("failed to update column item rel id", K(ret)); } else if (OB_FAIL(stmt->formalize_stmt(ctx_->session_info_))) { - LOG_WARN("failed to formlize stmt", K(ret)); + LOG_WARN("failed to formalize stmt", K(ret)); } } return ret; @@ -353,9 +353,9 @@ int ObTransformLeftJoinToAnti::clear_for_update(TableItem *table) { table->for_update_ = false; } else if (table->is_joined_table()) { if (OB_FAIL(clear_for_update(static_cast(table)->left_table_))) { - LOG_WARN("fail to cleanr for update", K(ret)); + LOG_WARN("fail to clear for update", K(ret)); } else if (OB_FAIL(clear_for_update(static_cast(table)->right_table_))) { - LOG_WARN("fail to cleanr for update", K(ret)); + LOG_WARN("fail to clear for update", K(ret)); } } } @@ -523,7 +523,7 @@ int ObTransformLeftJoinToAnti::check_can_be_trans(ObDMLStmt *stmt, JoinedTable *right_joined_table = static_cast(right_table); if (is_contain(right_joined_table->single_table_ids_, table_info->table_id_)) { is_table_valid = false; - OPT_TRACE("right table is dml targe table"); + OPT_TRACE("right table is dml target table"); } } else if (table_info->table_id_ == right_table->table_id_) { is_table_valid = false; diff --git a/src/sql/rewrite/ob_transform_subquery_coalesce.h b/src/sql/rewrite/ob_transform_subquery_coalesce.h index fab9573817..b8c2d21bc3 100644 --- a/src/sql/rewrite/ob_transform_subquery_coalesce.h +++ b/src/sql/rewrite/ob_transform_subquery_coalesce.h @@ -49,7 +49,7 @@ private: ObRawExpr *any_expr_; ObRawExpr *all_expr_; ObStmtMapInfo map_info_; - TransformFlag trans_flag_ = DEFAULT; //defalut value; + TransformFlag trans_flag_ = DEFAULT; //default value; TO_STRING_KV(K(exists_expr_), K(not_exists_expr_), diff --git a/src/storage/ls/ob_ls_tablet_service.cpp b/src/storage/ls/ob_ls_tablet_service.cpp index c875d8d369..2d6283f1fe 100755 --- a/src/storage/ls/ob_ls_tablet_service.cpp +++ b/src/storage/ls/ob_ls_tablet_service.cpp @@ -6180,7 +6180,7 @@ int ObLSTabletService::check_need_rollback_in_transfer_for_4377_(const transacti // read from origin tablet, if there's inconsistent, it should throw 4377 error // CASE 2.2: transfer_scn_ is valid, the transfer_scn_ is backfilled, it means that // tablet has started to transfer out. If it's the first transfer, we should - // throw 4377 erorr, otherwise we should compare the transfer_scn_ with the tx_scn, + // throw 4377 error, otherwise we should compare the transfer_scn_ with the tx_scn, // and decide to rollback the transaction or throw 4377 error. // However, we can not be sure about whether this transfer out is the first transfer or not. // So we consider all the transfer out status as not the first transfer here, to avoid diff --git a/unittest/storage/mockcontainer/mock_ob_iterator.cpp b/unittest/storage/mockcontainer/mock_ob_iterator.cpp index 97c0e542b1..420f817753 100644 --- a/unittest/storage/mockcontainer/mock_ob_iterator.cpp +++ b/unittest/storage/mockcontainer/mock_ob_iterator.cpp @@ -859,7 +859,7 @@ int ObMockIteratorBuilder::static_init() && OB_SUCCESS != (ret = str_to_flag_.create( cal_next_prime(FLAG_NUM * 2), ObModIds::OB_HASH_BUCKET))) { - STORAGE_LOG(WARN, "out of memeory"); + STORAGE_LOG(WARN, "out of memory"); } else if (OB_SUCCESS != str_to_flag_.set_refactored( ObString::make_string("RF_ROW_DOES_NOT_EXIST"), ObDmlFlag::DF_NOT_EXIST) @@ -894,7 +894,7 @@ int ObMockIteratorBuilder::static_init() && OB_SUCCESS != (ret = str_to_dml_.create( cal_next_prime(DML_NUM * 2), ObModIds::OB_HASH_BUCKET))) { - STORAGE_LOG(WARN, "out of memeory"); + STORAGE_LOG(WARN, "out of memory"); } else if (OB_SUCCESS != str_to_dml_.set_refactored( ObString::make_string("INSERT"), DF_INSERT) || OB_SUCCESS != str_to_dml_.set_refactored( @@ -913,7 +913,7 @@ int ObMockIteratorBuilder::static_init() && OB_SUCCESS != (ret = str_to_base_.create( cal_next_prime(BASE_NUM * 2), ObModIds::OB_HASH_BUCKET))) { - STORAGE_LOG(WARN, "out of memeory"); + STORAGE_LOG(WARN, "out of memory"); } else if (OB_SUCCESS != str_to_base_.set_refactored( ObString::make_string("TRUE"), true) || OB_SUCCESS != str_to_base_.set_refactored( @@ -928,7 +928,7 @@ int ObMockIteratorBuilder::static_init() && OB_SUCCESS != (ret = str_to_is_get_.create( cal_next_prime(BASE_NUM * 2), ObModIds::OB_HASH_BUCKET))) { - STORAGE_LOG(WARN, "out of memeory"); + STORAGE_LOG(WARN, "out of memory"); } else if (OB_SUCCESS != str_to_is_get_.set_refactored( ObString::make_string("TRUE"), true) || OB_SUCCESS != str_to_is_get_.set_refactored( @@ -943,7 +943,7 @@ int ObMockIteratorBuilder::static_init() && OB_SUCCESS != (ret = str_to_trans_id_.create( cal_next_prime(BASE_NUM * 3), ObModIds::OB_HASH_BUCKET))) { - STORAGE_LOG(WARN, "out of memeory"); + STORAGE_LOG(WARN, "out of memory"); } else if (OB_SUCCESS != str_to_trans_id_.set_refactored( ObString::make_string("trans_id_1"), trans_id_list_[0]) || OB_SUCCESS != str_to_trans_id_.set_refactored( @@ -981,7 +981,7 @@ int ObMockIteratorBuilder::static_init() if (ret == OB_SUCCESS && OB_SUCCESS != (ret = str_to_multi_version_row_flag_.create( cal_next_prime(MULTI_VERSION_ROW_FLAG_NUM * 2), ObModIds::OB_HASH_BUCKET))) { - STORAGE_LOG(WARN, "out of memeory"); + STORAGE_LOG(WARN, "out of memory"); } else if (OB_SUCCESS != str_to_multi_version_row_flag_.set_refactored(ObString::make_string("N"), 0) || OB_SUCCESS != str_to_multi_version_row_flag_.set_refactored(ObString::make_string("C"), 8) || OB_SUCCESS != str_to_multi_version_row_flag_.set_refactored(ObString::make_string("L"), 32)