diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2015-11-13 14:08:38 +0100 |
---|---|---|
committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2015-11-13 14:08:38 +0100 |
commit | 6bf88cdd9d2b77a2e1ac3b11ab8e1d30658f4cb5 (patch) | |
tree | e2f6bb4c06311adbc06ba155bb1a11edfc9e3efe /sql/sql_parse.cc | |
parent | 2776159e424dc04ef162b9cc0a2bd075419e0eb4 (diff) | |
parent | ba02550166eb39c0375a6422ecaa4731421250b6 (diff) | |
download | mariadb-git-6bf88cdd9d2b77a2e1ac3b11ab8e1d30658f4cb5.tar.gz |
Merge branch 'mdev7818-4' into bb-10.0-knielsen
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6557d2d4e90..a598030c5bd 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4283,6 +4283,17 @@ end_with_restore_list: break; } + if (lex->type & REFRESH_READ_LOCK) + { + /* + We need to pause any parallel replication slave workers during FLUSH + TABLES WITH READ LOCK. Otherwise we might cause a deadlock, as + worker threads eun run in arbitrary order but need to commit in a + specific given order. + */ + if (rpl_pause_for_ftwrl(thd)) + goto error; + } /* reload_acl_and_cache() will tell us if we are allowed to write to the binlog or not. @@ -4313,6 +4324,8 @@ end_with_restore_list: if (!res) my_ok(thd); } + if (lex->type & REFRESH_READ_LOCK) + rpl_unpause_after_ftwrl(thd); break; } |