[FEAT MERGE] implement values statement
Co-authored-by: wangt1xiuyi <13547954130@163.com>
This commit is contained in:
@ -1034,10 +1034,15 @@ int ObSqlParameterization::parameterize_syntax_tree(common::ObIAllocator &alloca
|
||||
fp_ctx.sql_mode_ = session->get_sql_mode();
|
||||
fp_ctx.is_udr_mode_ = pc_ctx.is_rewrite_sql_;
|
||||
fp_ctx.def_name_ctx_ = pc_ctx.def_name_ctx_;
|
||||
ObString raw_sql = pc_ctx.raw_sql_;
|
||||
if (pc_ctx.sql_ctx_.is_do_insert_batch_opt()) {
|
||||
raw_sql = pc_ctx.insert_batch_opt_info_.new_reconstruct_sql_;
|
||||
} else if (pc_ctx.exec_ctx_.has_dynamic_values_table()) {
|
||||
raw_sql = pc_ctx.new_raw_sql_;
|
||||
}
|
||||
if (OB_FAIL(fast_parser(allocator,
|
||||
fp_ctx,
|
||||
pc_ctx.sql_ctx_.is_do_insert_batch_opt() ?
|
||||
pc_ctx.insert_batch_opt_info_.new_reconstruct_sql_ : pc_ctx.raw_sql_,
|
||||
raw_sql,
|
||||
pc_ctx.fp_result_))) {
|
||||
SQL_PC_LOG(WARN, "fail to fast parser", K(ret));
|
||||
}
|
||||
@ -1474,8 +1479,8 @@ int ObSqlParameterization::fast_parser(ObIAllocator &allocator,
|
||||
|| (ObParser::is_pl_stmt(sql, nullptr, &is_call_procedure) && !is_call_procedure))) {
|
||||
(void)fp_result.pc_key_.name_.assign_ptr(sql.ptr(), sql.length());
|
||||
} else if (GCONF._ob_enable_fast_parser) {
|
||||
if (OB_FAIL(ObFastParser::parse(sql, fp_ctx, allocator, no_param_sql_ptr,
|
||||
no_param_sql_len, p_list, param_num, fp_result.question_mark_ctx_, fp_result.values_token_pos_))) {
|
||||
if (OB_FAIL(ObFastParser::parse(sql, fp_ctx, allocator, no_param_sql_ptr, no_param_sql_len,
|
||||
p_list, param_num, fp_result, fp_result.values_token_pos_))) {
|
||||
LOG_WARN("fast parse error", K(param_num),
|
||||
K(ObString(no_param_sql_len, no_param_sql_ptr)), K(sql));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user