Query cache should be invalidated in non-PRIMARY
Bug #1296403 reported by
Raghavendra D Prabhu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership |
New
|
High
|
Unassigned | |||
5.5 |
New
|
High
|
Unassigned | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When query cache is used and a node goes into non-PRIM state, queries which returned results earlier (and cached into query cache) still return results whereas newer queries (or the ones not cached) return 'unknown command'. This inconsistent return of results should be prevented by invalidating query cache when a node becomes non-PRIM (or when wsrep_ready is OFF).
Related branches
lp:~percona-core/percona-xtradb-cluster/trunk-25-Bug1296403
- Raghavendra D Prabhu (community): Approve
-
Diff: 14 lines (+4/-0)1 file modifiedsql/wsrep_mysqld.cc (+4/-0)
To post a comment you must log in.
=== modified file 'sql/wsrep_ mysqld. cc'
--- sql/wsrep_mysqld.cc 2014-04-20 17:19:52 +0000
+++ sql/wsrep_mysqld.cc 2014-04-20 18:36:58 +0000
@@ -230,6 +230,10 @@
/* Proceed further only if view is PRIMARY */ flush() ; QUERY_CACHE* / ready_set( FALSE); UNDEFINED;
if (WSREP_VIEW_PRIMARY != view->status) {
+#ifdef HAVE_QUERY_CACHE
+ // query cache must be initialised by now
+ query_cache.
+#endif /*HAVE_
wsrep_
new_status= WSREP_MEMBER_
/* Always record local_uuid and local_seqno in non-prim since this
in wsrep_view_ handler_ cb should do.