From 329058be298a471006e55a674db1c4d769acaf67 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 27 Sep 2018 17:28:01 +0200 Subject: wsrep: create a macro for the error: label that is used by WSREP_TO_ISOLATION_BEGIN and other galera macros, to avoid the need for wrapping this label in #ifdef WITH_WSREP/#endif --- sql/sql_view.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/sql_view.cc') diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 6bd6b6a7b63..b7ff4513a32 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -691,10 +691,10 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, lex->link_first_table_back(view, link_to_local); DBUG_RETURN(0); -#ifdef WITH_WSREP - error: + +WSREP_ERROR_LABEL: res= TRUE; -#endif /* WITH_WSREP */ + err: THD_STAGE_INFO(thd, stage_end); lex->link_first_table_back(view, link_to_local); -- cgit v1.2.1 From 6472c5c015a174ffd680fddc8f20c7a94684a552 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Sat, 3 Nov 2018 14:24:15 +0400 Subject: MDEV-15890 Strange error message if you try to FLUSH TABLES after LOCK TABLES . LOCK view WRITE shouldn't block FLUSH view. So we set the view's mdl_request type to it's tables. --- sql/sql_view.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sql/sql_view.cc') diff --git a/sql/sql_view.cc b/sql/sql_view.cc index b7ff4513a32..9a9309a133b 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1534,8 +1534,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table, for (tbl= view_main_select_tables; tbl; tbl= tbl->next_local) { tbl->lock_type= table->lock_type; - tbl->mdl_request.set_type((tbl->lock_type >= TL_WRITE_ALLOW_WRITE) ? - MDL_SHARED_WRITE : MDL_SHARED_READ); + tbl->mdl_request.set_type(table->mdl_request.type); } /* If the view is mergeable, we might want to -- cgit v1.2.1