fix mysqltest

This commit is contained in:
obdev 2023-01-29 16:41:26 +08:00 committed by ob-robot
parent f66c6b5ece
commit a185139b90
3 changed files with 20 additions and 10 deletions

View File

@ -45,5 +45,22 @@ int ObLogLinkDml::get_explain_name_internal(char *buf, const int64_t buf_len, in
return ret;
}
int ObLogLinkDml::get_plan_item_info(PlanText &plan_text,
ObSqlPlanItem &plan_item)
{
int ret = OB_SUCCESS;
if (OB_FAIL(ObLogicalOperator::get_plan_item_info(plan_text, plan_item))) {
LOG_WARN("failed to get plan item info", K(ret));
} else {
BEGIN_BUF_PRINT;
if (OB_FAIL(get_explain_name_internal(buf, buf_len, pos))) {
LOG_WARN("failed to get explain name", K(ret));
}
END_BUF_PRINT(plan_item.operation_, plan_item.operation_len_);
}
return ret;
}
} // namespace sql
} // namespace oceanbase

View File

@ -16,6 +16,7 @@ public:
virtual ~ObLogLinkDml() {}
virtual int compute_op_ordering() override;
virtual int get_explain_name_internal(char *buf, const int64_t buf_len, int64_t &pos) override;
virtual int get_plan_item_info(PlanText &plan_text, ObSqlPlanItem &plan_item) override;
inline void set_dml_type(stmt::StmtType type) { dml_type_ = type; }
private:
stmt::StmtType dml_type_;

View File

@ -588,11 +588,7 @@ select (with RECURSIVE qn as (select 'with RECURSIVE' from dual) select * from q
from dual;
show create view v;
View Create View character_set_client collation_connection
<<<<<<< HEAD
v CREATE VIEW `v` AS select (WITH RECURSIVE `qn`(`with RECURSIVE`) as ((select 'with RECURSIVE')) select `qn`.`with RECURSIVE` from `qn`) AS `scal_subq` utf8mb4 utf8mb4_general_ci
=======
v CREATE VIEW `v` AS select (WITH RECURSIVE `qn` as (select 'with RECURSIVE' AS `with RECURSIVE`) select `qn`.`with RECURSIVE` from `qn`) AS `scal_subq` utf8mb4 utf8mb4_general_ci
>>>>>>> origin/master
v CREATE VIEW `v` AS select (WITH RECURSIVE `qn` as (select 'with RECURSIVE') select `qn`.`with RECURSIVE` from `qn`) AS `scal_subq` utf8mb4 utf8mb4_general_ci
select * from v;
+----------------+
| scal_subq |
@ -603,11 +599,7 @@ drop view v;
create view v as select * from (with RECURSIVE qn as (select 'with RECURSIVE' from dual) select * from qn) dt;
show create view v;
View Create View character_set_client collation_connection
<<<<<<< HEAD
v CREATE VIEW `v` AS select `dt`.`with RECURSIVE` AS `with RECURSIVE` from (WITH RECURSIVE `qn`(`with RECURSIVE`) as (select 'with RECURSIVE' AS `with RECURSIVE`) select `qn`.`with RECURSIVE` AS `with RECURSIVE` from `qn`) `dt` utf8mb4 utf8mb4_general_ci
=======
v CREATE VIEW `v` AS select `dt`.`with RECURSIVE` AS `with RECURSIVE` from (WITH RECURSIVE `qn` as (select 'with RECURSIVE' AS `with RECURSIVE`) select `qn`.`with RECURSIVE` AS `with RECURSIVE` from `qn`) dt utf8mb4 utf8mb4_general_ci
>>>>>>> origin/master
v CREATE VIEW `v` AS select `dt`.`with RECURSIVE` AS `with RECURSIVE` from (WITH RECURSIVE `qn` as (select 'with RECURSIVE') select `qn`.`with RECURSIVE` AS `with RECURSIVE` from `qn`) `dt` utf8mb4 utf8mb4_general_ci
select * from v;
+----------------+
| with RECURSIVE |