diff --git a/src/sql/ob_result_set.cpp b/src/sql/ob_result_set.cpp index b6543d3a4c..2339ce3d6a 100644 --- a/src/sql/ob_result_set.cpp +++ b/src/sql/ob_result_set.cpp @@ -1180,11 +1180,9 @@ int ObResultSet::ExternalRetrieveInfo::build_into_exprs( } is_select_for_update_ = (static_cast(stmt)).has_for_update(); has_hidden_rowid_ = (static_cast(stmt)).has_hidden_rowid(); - is_bulk_ = (static_cast(stmt)).is_bulk(); } else if (stmt.is_insert_stmt() || stmt.is_update_stmt() || stmt.is_delete_stmt()) { ObDelUpdStmt &dml_stmt = static_cast(stmt); OZ (into_exprs_.assign(dml_stmt.get_returning_into_exprs())); - is_bulk_ = (static_cast(stmt)).is_bulk(); } return ret; @@ -1293,6 +1291,10 @@ int ObResultSet::ExternalRetrieveInfo::build( { int ret = OB_SUCCESS; OZ (build_into_exprs(stmt, ns, is_dynamic_sql)); + CK (OB_NOT_NULL(session_info.get_cur_exec_ctx())); + CK (OB_NOT_NULL(session_info.get_cur_exec_ctx()->get_sql_ctx())); + OX (is_bulk_ = session_info.get_cur_exec_ctx()->get_sql_ctx()->is_bulk_); + OX (session_info.get_cur_exec_ctx()->get_sql_ctx()->is_bulk_ = false); if (OB_SUCC(ret)) { ObSchemaGetterGuard *schema_guard = NULL; if (OB_ISNULL(stmt.get_query_ctx()) || diff --git a/src/sql/ob_sql_context.cpp b/src/sql/ob_sql_context.cpp index bc8dc4664d..3408c21f9e 100644 --- a/src/sql/ob_sql_context.cpp +++ b/src/sql/ob_sql_context.cpp @@ -239,6 +239,7 @@ ObSqlCtx::ObSqlCtx() res_map_rule_param_idx_(OB_INVALID_INDEX), res_map_rule_version_(0), is_text_ps_mode_(false), + is_bulk_(false), reroute_info_(nullptr) { sql_id_[0] = '\0'; @@ -291,6 +292,7 @@ void ObSqlCtx::reset() cur_plan_ = nullptr; is_execute_call_stmt_ = false; is_text_ps_mode_ = false; + is_bulk_ = false; } //release dynamic allocated memory diff --git a/src/sql/ob_sql_context.h b/src/sql/ob_sql_context.h index 8339883365..88e171e707 100644 --- a/src/sql/ob_sql_context.h +++ b/src/sql/ob_sql_context.h @@ -523,6 +523,7 @@ public: int64_t res_map_rule_param_idx_; uint64_t res_map_rule_version_; bool is_text_ps_mode_; + bool is_bulk_; private: share::ObFeedbackRerouteInfo *reroute_info_; }; diff --git a/src/sql/resolver/dml/ob_dml_stmt.cpp b/src/sql/resolver/dml/ob_dml_stmt.cpp index 848d23e69f..c5360390c7 100644 --- a/src/sql/resolver/dml/ob_dml_stmt.cpp +++ b/src/sql/resolver/dml/ob_dml_stmt.cpp @@ -385,8 +385,7 @@ ObDMLStmt::ObDMLStmt(stmt::StmtType type) user_var_exprs_(), check_constraint_items_(), dblink_id_(OB_INVALID_ID), - is_reverse_link_(false), - is_bulk_(false) + is_reverse_link_(false) { } @@ -496,7 +495,6 @@ int ObDMLStmt::assign(const ObDMLStmt &other) transpose_item_ = other.transpose_item_; dblink_id_ = other.dblink_id_; is_reverse_link_ = other.is_reverse_link_; - is_bulk_ = other.is_bulk_; } return ret; } @@ -659,7 +657,6 @@ int ObDMLStmt::deep_copy_stmt_struct(ObIAllocator &allocator, is_fetch_with_ties_ = other.is_fetch_with_ties_; dblink_id_ = other.dblink_id_; is_reverse_link_ = other.is_reverse_link_; - is_bulk_ = other.is_bulk_; } if (OB_SUCC(ret)) { TransposeItem *tmp = NULL; diff --git a/src/sql/resolver/dml/ob_dml_stmt.h b/src/sql/resolver/dml/ob_dml_stmt.h index b61c6d805f..ab918f85c8 100644 --- a/src/sql/resolver/dml/ob_dml_stmt.h +++ b/src/sql/resolver/dml/ob_dml_stmt.h @@ -973,8 +973,6 @@ public: inline bool is_dblink_stmt() const { return OB_INVALID_ID != dblink_id_; } inline void set_reverse_link() { is_reverse_link_ = true; } inline bool is_reverse_link() const { return is_reverse_link_; } - inline void set_bulk() { is_bulk_ = true; } - inline bool is_bulk() const { return is_bulk_; } int add_subquery_ref(ObQueryRefRawExpr *query_ref); virtual int get_child_stmt_size(int64_t &child_size) const; int64_t get_subquery_expr_size() const { return subquery_exprs_.count(); } @@ -1211,7 +1209,6 @@ protected: */ int64_t dblink_id_; bool is_reverse_link_; - bool is_bulk_; }; template diff --git a/tools/deploy/mysql_test/test_suite/pl/r/mysql/sp_mysql.result b/tools/deploy/mysql_test/test_suite/pl/r/mysql/sp_mysql.result index 7d4f7c3ecc..1e0ed0d7f9 100644 --- a/tools/deploy/mysql_test/test_suite/pl/r/mysql/sp_mysql.result +++ b/tools/deploy/mysql_test/test_suite/pl/r/mysql/sp_mysql.result @@ -4592,8 +4592,8 @@ use test| select schema_name from information_schema.schemata where schema_name like 'bug18344%'| schema_name -bug18344_0123456789012 bug18344_012345678901 +bug18344_0123456789012 select routine_name,routine_schema from information_schema.routines where routine_schema like 'bug18344%'| routine_name routine_schema