fix nowait not param

This commit is contained in:
obdev
2023-04-27 02:44:55 +00:00
committed by ob-robot
parent b82a6210d4
commit a275936785
3 changed files with 10 additions and 9 deletions

View File

@ -22,17 +22,17 @@ namespace common
{ {
class ObObj; class ObObj;
} }
namespace observer namespace observer
{ {
class ObInfoSchemaDiskStatTable : public common::ObVirtualTableScannerIterator class ObInfoSchemaDiskStatTable : public common::ObVirtualTableScannerIterator
{ {
public: public:
ObInfoSchemaDiskStatTable(); ObInfoSchemaDiskStatTable();
virtual ~ObInfoSchemaDiskStatTable(); virtual ~ObInfoSchemaDiskStatTable();
virtual int inner_get_next_row(common::ObNewRow *&row); virtual int inner_get_next_row(common::ObNewRow *&row);
virtual void reset(); virtual void reset();
inline void set_addr(common::ObAddr &addr) {addr_ = &addr;} inline void set_addr(common::ObAddr &addr) {addr_ = &addr;}
virtual int set_ip(common::ObAddr *addr); virtual int set_ip(common::ObAddr *addr);
@ -58,4 +58,3 @@ private:
} }
} }
#endif /* OCEANBASE_OBSERVER_VIRTUAL_TABLE_OB_DISK_STAT_TABLE */ #endif /* OCEANBASE_OBSERVER_VIRTUAL_TABLE_OB_DISK_STAT_TABLE */

View File

@ -9170,6 +9170,7 @@ opt_for_update_wait:
{ {
/* USE T_SFU_XXX to avoid being parsed by plan cache as template var */ /* USE T_SFU_XXX to avoid being parsed by plan cache as template var */
malloc_terminal_node($$, result->malloc_pool_, T_SFU_INT); malloc_terminal_node($$, result->malloc_pool_, T_SFU_INT);
$$->is_hidden_const_ = 1;
$$->value_ = -1; $$->value_ = -1;
} }
| WAIT DECIMAL_VAL | WAIT DECIMAL_VAL
@ -9187,11 +9188,13 @@ opt_for_update_wait:
{ {
malloc_terminal_node($$, result->malloc_pool_, T_SFU_INT); malloc_terminal_node($$, result->malloc_pool_, T_SFU_INT);
$$->value_ = 0; $$->value_ = 0;
$$->is_hidden_const_ = 1;
} }
| NO_WAIT | NO_WAIT
{ {
malloc_terminal_node($$, result->malloc_pool_, T_SFU_INT); malloc_terminal_node($$, result->malloc_pool_, T_SFU_INT);
$$->value_ = 0; $$->value_ = 0;
$$->is_hidden_const_ = 1;
}; };
parameterized_trim: parameterized_trim:

View File

@ -246,6 +246,7 @@ int ObSqlParameterization::is_fast_parse_const(TransformTreeCtx &ctx)
|| (T_INT == ctx.tree_->type_ && true == ctx.tree_->is_hidden_const_) || (T_INT == ctx.tree_->type_ && true == ctx.tree_->is_hidden_const_)
|| (T_CAST_ARGUMENT == ctx.tree_->type_ && true == ctx.tree_->is_hidden_const_) || (T_CAST_ARGUMENT == ctx.tree_->type_ && true == ctx.tree_->is_hidden_const_)
|| (T_DOUBLE == ctx.tree_->type_ && true == ctx.tree_->is_hidden_const_) || (T_DOUBLE == ctx.tree_->type_ && true == ctx.tree_->is_hidden_const_)
|| (T_SFU_INT == ctx.tree_->type_ && true == ctx.tree_->is_hidden_const_)
|| (T_FLOAT == ctx.tree_->type_ && true == ctx.tree_->is_hidden_const_)) { || (T_FLOAT == ctx.tree_->type_ && true == ctx.tree_->is_hidden_const_)) {
ctx.is_fast_parse_const_ = false; ctx.is_fast_parse_const_ = false;
} else { } else {
@ -858,11 +859,9 @@ int ObSqlParameterization::check_and_generate_param_info(const ObIArray<ObPCPara
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
if (sql_info.total_ != raw_params.count()) { if (sql_info.total_ != raw_params.count()) {
ret = OB_NOT_SUPPORTED; ret = OB_NOT_SUPPORTED;
#if !defined(NDEBUG)
SQL_PC_LOG(ERROR, "const number of fast parse and normal parse is different", SQL_PC_LOG(ERROR, "const number of fast parse and normal parse is different",
"fast_parse_const_num", raw_params.count(), "fast_parse_const_num", raw_params.count(),
"normal_parse_const_num", sql_info.total_); "normal_parse_const_num", sql_info.total_);
#endif
} }
ObPCParam *pc_param = NULL; ObPCParam *pc_param = NULL;
for (int32_t i = 0; OB_SUCC(ret) && i < raw_params.count(); i ++) { for (int32_t i = 0; OB_SUCC(ret) && i < raw_params.count(); i ++) {