fix inner expr index record operation repeatedly.
This commit is contained in:
parent
1c8aa41d3e
commit
4d1b6b6059
@ -478,8 +478,7 @@ int ObDDLService::create_inner_expr_index(ObMySQLTransaction &trans,
|
||||
const ObTableSchema &orig_table_schema,
|
||||
ObTableSchema &new_table_schema,
|
||||
ObIArray<ObColumnSchemaV2*> &new_columns,
|
||||
ObTableSchema &index_schema,
|
||||
const ObString *ddl_stmt_str)
|
||||
ObTableSchema &index_schema)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObSchemaGetterGuard schema_guard;
|
||||
@ -528,7 +527,8 @@ int ObDDLService::create_inner_expr_index(ObMySQLTransaction &trans,
|
||||
trans))) {
|
||||
LOG_WARN("alter table options failed", K(ret), K(new_table_schema));
|
||||
} else if (OB_FAIL(ddl_operator.create_table(
|
||||
index_schema, trans, ddl_stmt_str, true, false))) {
|
||||
index_schema, trans, nullptr/*ddl_stmt_str*/, true, false))) {
|
||||
// record the create index operation when index enables rather than schema generates.
|
||||
LOG_WARN("failed to create index schema", K(ret));
|
||||
}
|
||||
}
|
||||
@ -570,7 +570,6 @@ int ObDDLService::create_global_index(
|
||||
|
||||
int ObDDLService::create_global_inner_expr_index(
|
||||
ObMySQLTransaction &trans,
|
||||
const obrpc::ObCreateIndexArg &arg,
|
||||
const share::schema::ObTableSchema &orig_table_schema,
|
||||
share::schema::ObTableSchema &new_table_schema,
|
||||
common::ObIArray<share::schema::ObColumnSchemaV2*> &new_columns,
|
||||
@ -580,8 +579,7 @@ int ObDDLService::create_global_inner_expr_index(
|
||||
if (OB_FAIL(check_inner_stat())) {
|
||||
LOG_WARN("variable is not init", K(ret));
|
||||
} else if (OB_FAIL(create_inner_expr_index(trans, orig_table_schema,
|
||||
new_table_schema, new_columns, index_schema,
|
||||
&arg.ddl_stmt_str_))) {
|
||||
new_table_schema, new_columns, index_schema))) {
|
||||
LOG_WARN("fail to create inner expr index", K(ret));
|
||||
}
|
||||
return ret;
|
||||
|
@ -144,8 +144,7 @@ public:
|
||||
const share::schema::ObTableSchema &orig_table_schema,
|
||||
share::schema::ObTableSchema &new_table_schema,
|
||||
common::ObIArray<share::schema::ObColumnSchemaV2*> &new_columns,
|
||||
share::schema::ObTableSchema &index_schema,
|
||||
const common::ObString *ddl_stmt_str);
|
||||
share::schema::ObTableSchema &index_schema);
|
||||
// check whether the foreign key related table is executing offline ddl, creating index, and constrtaint task.
|
||||
// And ddl should be refused if the foreign key related table is executing above ddl.
|
||||
int check_fk_related_table_ddl(
|
||||
@ -158,7 +157,6 @@ public:
|
||||
share::schema::ObTableSchema &index_schema);
|
||||
int create_global_inner_expr_index(
|
||||
ObMySQLTransaction &trans,
|
||||
const obrpc::ObCreateIndexArg &arg,
|
||||
const share::schema::ObTableSchema &orig_table_schema,
|
||||
share::schema::ObTableSchema &new_table_schema,
|
||||
common::ObIArray<share::schema::ObColumnSchemaV2*> &new_columns,
|
||||
|
@ -306,7 +306,7 @@ int ObIndexBuilder::do_create_global_index(
|
||||
}
|
||||
} else {
|
||||
if (OB_FAIL(ddl_service_.create_global_inner_expr_index(
|
||||
trans, new_arg, table_schema, new_table_schema, gen_columns, index_schema))) {
|
||||
trans, table_schema, new_table_schema, gen_columns, index_schema))) {
|
||||
LOG_WARN("fail to create global inner expr index", K(ret));
|
||||
}
|
||||
}
|
||||
@ -488,8 +488,7 @@ int ObIndexBuilder::do_create_local_index(
|
||||
table_schema,
|
||||
new_table_schema,
|
||||
gen_columns,
|
||||
index_schema,
|
||||
&my_arg.ddl_stmt_str_))) {
|
||||
index_schema))) {
|
||||
LOG_WARN("fail to create inner expr index", K(ret));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user