diff options
author | Sachin Setiya <sachinsetia1001@gmail.com> | 2016-12-14 09:30:43 +0530 |
---|---|---|
committer | Sachin Setiya <sachinsetia1001@gmail.com> | 2016-12-14 09:30:43 +0530 |
commit | 0c79de2419194f850e92de6ffa48d2e92055ee50 (patch) | |
tree | 6a16be4413a1f6605985cf3f4cde537e01f8f8b9 /sql/wsrep_mysqld.cc | |
parent | 25a9a3da346b6d763cf77ce82b82c65f4b1769cb (diff) | |
download | mariadb-git-0c79de2419194f850e92de6ffa48d2e92055ee50.tar.gz |
MDEV-11479 Improved wsrep_dirty_reads
Tasks:-
Changes in wsrep_dirty_reads variable
1.) Global + Session scope (Current: session-only)
2.) Can be set using command line.
3.) Allow all commands that do not change data (besides SELECT)
4.) Allow prepared Statements that do not change data
5.) Works with wsrep_sync_wait enabled
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r-- | sql/wsrep_mysqld.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 0deb19dfc77..62d7b7ecff1 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -96,6 +96,8 @@ bool wsrep_new_cluster = false; // Bootstrap the cluster ? bool wsrep_gtid_mode = 0; // gtid_domain_id for galera transactions. uint32 wsrep_gtid_domain_id = 0; +// Allow reads even if the node is not in the primary component. +bool wsrep_dirty_reads = false; /* * End configuration options @@ -958,6 +960,8 @@ bool wsrep_must_sync_wait (THD* thd, uint mask) { return (thd->variables.wsrep_sync_wait & mask) && thd->variables.wsrep_on && + !(thd->variables.wsrep_dirty_reads && + !is_update_query(thd->lex->sql_command)) && !thd->in_active_multi_stmt_transaction() && thd->wsrep_conflict_state != REPLAYING && thd->wsrep_sync_wait_gtid.seqno == WSREP_SEQNO_UNDEFINED; |