summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2017-10-11 15:35:17 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2017-10-19 10:05:22 +0300
commit241a2687d7ce07572adb2fb4629bbd319a732e5a (patch)
treec206516bcf77762319f985944649334db8301c80 /sql/sql_view.cc
parent12d7ee03efa36e9eb293fefe8313d3848fc41113 (diff)
downloadmariadb-git-241a2687d7ce07572adb2fb4629bbd319a732e5a.tar.gz
MW-416 Replicate DDL after ACL check
CREATE VIEW handling had an issue, because CREATE VIEW replication happened when view was unlinked from table list. This caused debug assert in wsrep_mysqld.cc:wsrep_can_run_in_toi() MySQL 5.5 version does not have this assert, but it is still better to run replication when table list is not manipulated.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index f6948a76f6a..bbc5f002461 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -429,10 +429,10 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
if ((res= create_view_precheck(thd, tables, view, mode)))
goto err;
- WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
lex->link_first_table_back(view, link_to_local);
view->open_type= OT_BASE_ONLY;
+ WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
if (open_and_lock_tables(thd, lex->query_tables, TRUE, 0))
{