- PXC#592: Tried closing fk-reference-table that was never opened.

Function "wsrep_row_upd_check_foreign_constraints" tried to mark
  fk-reference-table opened without ensuring it table is really opened.
This commit is contained in:
Krunal Bauskar 2016-06-02 16:44:54 +05:30 committed by Nirbhay Choubey
commit c9ac48f845

View file

@ -410,7 +410,7 @@ wsrep_row_upd_check_foreign_constraints(
dict_table_open_on_name( dict_table_open_on_name(
foreign->referenced_table_name_lookup, foreign->referenced_table_name_lookup,
FALSE, FALSE, DICT_ERR_IGNORE_NONE); FALSE, FALSE, DICT_ERR_IGNORE_NONE);
opened = TRUE; opened = (foreign->referenced_table) ? TRUE : FALSE;
} }
if (foreign->referenced_table) { if (foreign->referenced_table) {
@ -433,7 +433,7 @@ wsrep_row_upd_check_foreign_constraints(
->n_foreign_key_checks_running); ->n_foreign_key_checks_running);
if (opened == TRUE) { if (opened == TRUE) {
dict_table_close(foreign->referenced_table, TRUE, FALSE); dict_table_close(foreign->referenced_table, FALSE, FALSE);
opened = FALSE; opened = FALSE;
} }
} }