fix stmt print ignore hint bug
This commit is contained in:
@ -112,6 +112,7 @@ int ObCreateTableExecutor::prepare_ins_arg(ObCreateTableStmt &stmt,
|
||||
obj_print_params,
|
||||
param_store,
|
||||
true);
|
||||
select_stmt_printer.set_is_root(true); // print hint as root stmt
|
||||
if (OB_ISNULL(buf)) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("allocate memory failed");
|
||||
|
||||
@ -1548,6 +1548,10 @@ int ObCreateTableResolver::resolve_table_elements_from_select(const ParseNode &p
|
||||
if (OB_ISNULL(select_stmt)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("invalid select stmt", K(select_stmt));
|
||||
} else if (OB_FAIL(params_.query_ctx_->query_hint_.init_query_hint(allocator_,
|
||||
session_info_,
|
||||
select_stmt))) {
|
||||
LOG_WARN("failed to init query hint.", K(ret));
|
||||
} else {
|
||||
ObIArray<SelectItem> &select_items = select_stmt->get_select_items();
|
||||
ObColumnSchemaV2 column;
|
||||
|
||||
@ -531,6 +531,7 @@ int ObCreateViewResolver::stmt_print(const ObSelectStmt *stmt,
|
||||
params_.schema_checker_->get_schema_guard(),
|
||||
obj_print_params, true);
|
||||
stmt_printer.set_column_list(column_list);
|
||||
stmt_printer.set_is_root(true); // print hint as root stmt
|
||||
if (OB_FAIL(stmt_printer.do_print())) {
|
||||
if (OB_SIZE_OVERFLOW == ret && buf_len < OB_MAX_PACKET_LENGTH) {
|
||||
buf_len = std::min(buf_len * 2, OB_MAX_PACKET_LENGTH);
|
||||
|
||||
Reference in New Issue
Block a user