[CP] [CP] Disable pdml when primary key has auto increment column
This commit is contained in:
		| @ -325,6 +325,8 @@ int ObInsertLogPlan::check_need_online_stats_gather(bool &need_osg) | ||||
|   ObObj online_sys_var_obj; | ||||
|   const ObInsertStmt *insert_stmt = NULL; | ||||
|   TableItem *ins_table = NULL; | ||||
|   bool disable_pdml = false; | ||||
|   bool is_pk_auto_inc = false; | ||||
|   if (OB_ISNULL(insert_stmt = get_stmt()) || | ||||
|       OB_ISNULL(ins_table = insert_stmt->get_table_item_by_id(insert_stmt->get_insert_table_info().table_id_))) { | ||||
|     ret = OB_ERR_UNEXPECTED; | ||||
| @ -334,6 +336,11 @@ int ObInsertLogPlan::check_need_online_stats_gather(bool &need_osg) | ||||
|              || !insert_stmt->value_from_select() | ||||
|              || (!get_optimizer_context().get_session_info()->is_user_session())) { | ||||
|     need_gathering = false; | ||||
|   } else if (OB_FAIL(insert_stmt->check_pdml_disabled(get_optimizer_context().is_online_ddl(), | ||||
|                                                       disable_pdml, is_pk_auto_inc))) { | ||||
|     LOG_WARN("fail to check pdml disable for insert stmt", K(ret)); | ||||
|   } else if (disable_pdml) { | ||||
|     need_gathering = false; | ||||
|   } | ||||
|  | ||||
|   if (OB_FAIL(ret)) { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 hezuojiao
					hezuojiao