mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Fixes query cache so that it is aware of wsrep_sync_wait. Query cache would return (possibly stale) results to the client, regardless of the value of wsrep_sync_wait. - Includes the test case that reproduced the issue.
This commit is contained in:
committed by
Nirbhay Choubey
parent
c1ea0570af
commit
ace86a2375
@@ -1213,6 +1213,7 @@ THD::THD()
|
||||
wsrep_mysql_replicated = 0;
|
||||
wsrep_TOI_pre_query = NULL;
|
||||
wsrep_TOI_pre_query_len = 0;
|
||||
wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
|
||||
#endif
|
||||
/* Call to init() below requires fully initialized Open_tables_state. */
|
||||
reset_open_tables_state(this);
|
||||
@@ -1628,6 +1629,7 @@ void THD::init(void)
|
||||
wsrep_mysql_replicated = 0;
|
||||
wsrep_TOI_pre_query = NULL;
|
||||
wsrep_TOI_pre_query_len = 0;
|
||||
wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
|
||||
|
||||
/*
|
||||
@@wsrep_causal_reads is now being handled via wsrep_sync_wait, update it
|
||||
@@ -2361,6 +2363,10 @@ void THD::cleanup_after_query()
|
||||
rgi_slave->cleanup_after_query();
|
||||
#endif
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user