Under MIPS, the atomicity of some operations is not guaranteed and so an 
alternative implementation with a mutex is used. The compiler complains because 
the code is trying to change a variable (the mutex) from a const method of a 
class.

This patch adds "mutable" modifier to the mentioned variable.
diff -urN percona-xtradb-cluster-5.5-5.5.37-25.10+dfsg/sql/query_response_time.cc percona-xtradb-cluster-5.5-5.5.37-25.10+dfsg.minee/sql/query_response_time.cc
--- percona-xtradb-cluster-5.5-5.5.37-25.10+dfsg/sql/query_response_time.cc	2014-05-08 00:58:25.000000000 +0000
+++ percona-xtradb-cluster-5.5-5.5.37-25.10+dfsg.minee/sql/query_response_time.cc	2014-07-11 16:55:52.939978748 +0000
@@ -198,7 +198,7 @@
   /* The lock for atomic operations on m_count and m_total.  Only actually
   used on architectures that do not have atomic implementation of atomic
   operations. */
-  my_atomic_rwlock_t time_collector_lock;
+  mutable my_atomic_rwlock_t time_collector_lock;
   uint32   m_count[OVERALL_POWER_COUNT + 1];
   uint64   m_total[OVERALL_POWER_COUNT + 1];
 };

Attachment: signature.asc
Description: Digital signature

Reply via email to