fix create index on column default sequence bug
This commit is contained in:
		| @ -1649,8 +1649,19 @@ int ObRawExprUtils::build_seq_nextval_expr(ObRawExpr *&expr, | ||||
|                                           uint64_t seq_id, | ||||
|                                           ObDMLStmt *stmt) | ||||
| { | ||||
|   return build_seq_nextval_expr(expr, session_info, expr_factory, q_name.database_name_, | ||||
|                                 q_name.tbl_name_, q_name.col_name_, seq_id, stmt); | ||||
|   int ret = OB_SUCCESS; | ||||
|   if (OB_ISNULL(session_info)) { | ||||
|     ret = OB_ERR_UNEXPECTED; | ||||
|     LOG_WARN("session info is NULL", K(ret)); | ||||
|   } else { | ||||
|     const ObString &database_name = q_name.database_name_.empty() ? | ||||
|                                     session_info->get_database_name() : q_name.database_name_; | ||||
|     if (OB_FAIL(build_seq_nextval_expr(expr, session_info, expr_factory, database_name, | ||||
|                                 q_name.tbl_name_, q_name.col_name_, seq_id, stmt))) { | ||||
|       LOG_WARN("build seq nextval expr failed", K(ret)); | ||||
|     } | ||||
|   } | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| // build oracle sequence_object.currval, sequence_object.nextval expr | ||||
| @ -1669,7 +1680,7 @@ int ObRawExprUtils::build_seq_nextval_expr(ObRawExpr *&expr, | ||||
|   ObConstRawExpr *col_id_expr = NULL; | ||||
|   if (OB_ISNULL(session_info) || OB_ISNULL(expr_factory)) { | ||||
|     ret = OB_ERR_UNEXPECTED; | ||||
|     LOG_WARN("session info is NULL", K(session_info), K(expr_factory)); | ||||
|     LOG_WARN("session info is NULL", K(ret), K(session_info), K(expr_factory)); | ||||
|   } else if (NULL != stmt && OB_FAIL(stmt->get_sequence_expr(exists_seq_expr, | ||||
|                                                    tbl_name, | ||||
|                                                    col_name, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 sdc
					sdc