File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -782,11 +782,15 @@ bool add_cyclic_foreign_keys(THD *thd)
782
782
if (thd->dd_client ()->acquire (std::string (MYSQL_SCHEMA_NAME.str ),
783
783
(*it)->entity ()->name (), &table))
784
784
return true ;
785
- std::unique_ptr<Table_impl> table_clone (
786
- dynamic_cast <Table_impl*>(table->clone ()));
787
- table_clone->set_hidden ((*it)->entity ()->hidden ());
788
- if (thd->dd_client ()->store (static_cast <Table*>(table_clone.get ())))
789
- return end_transaction (thd, true );
785
+
786
+ if (table->hidden () != (*it)->entity ()->hidden ())
787
+ {
788
+ std::unique_ptr<Table_impl> table_clone (
789
+ dynamic_cast <Table_impl*>(table->clone ()));
790
+ table_clone->set_hidden ((*it)->entity ()->hidden ());
791
+ if (thd->dd_client ()->store (static_cast <Table*>(table_clone.get ())))
792
+ return end_transaction (thd, true );
793
+ }
790
794
end_transaction (thd, false );
791
795
}
792
796
You can’t perform that action at this time.
0 commit comments