MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:February 1 2011 2:58pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4160) Bug#59831
View as plain text  
#At file:///home/msvensson/mysql/7.0/ based on revid:jonas@stripped

 4160 Magnus Blåudd	2011-02-01
      Bug#59831 ndbinfo - counters not increasing after first query
       - Don't put ndbinfo results in query cache

    added:
      mysql-test/suite/ndb/r/ndbinfo_cache.result
      mysql-test/suite/ndb/t/ndbinfo_cache.test
    modified:
      sql/ha_ndbinfo.h
=== added file 'mysql-test/suite/ndb/r/ndbinfo_cache.result'
--- a/mysql-test/suite/ndb/r/ndbinfo_cache.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/r/ndbinfo_cache.result	2011-02-01 14:58:21 +0000
@@ -0,0 +1,16 @@
+USE ndbinfo;
+set GLOBAL query_cache_type=on;
+set GLOBAL query_cache_size=1355776;
+reset query cache;
+flush status;
+select * from counters;
+select * from counters;
+select * from counters;
+show status like "Qcache_queries_in_cache";
+Variable_name	Value
+Qcache_queries_in_cache	0
+show status like "Qcache_inserts";
+Variable_name	Value
+Qcache_inserts	0
+SET GLOBAL query_cache_size=default;
+SET GLOBAL query_cache_type=default;

=== added file 'mysql-test/suite/ndb/t/ndbinfo_cache.test'
--- a/mysql-test/suite/ndb/t/ndbinfo_cache.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/ndbinfo_cache.test	2011-02-01 14:58:21 +0000
@@ -0,0 +1,31 @@
+--source include/have_query_cache.inc
+--source include/have_ndb.inc
+
+--source ndbinfo_create.inc
+
+USE ndbinfo;
+
+# BUG#59831 ndbinfo - counters not increasing after first query
+# - ndbinfo tables should never be cached in query cache
+
+# Turn on and reset query cache
+set GLOBAL query_cache_type=on;
+set GLOBAL query_cache_size=1355776;
+reset query cache;
+flush status;
+
+# Perform same query several times, which were inserted
+# in the cache  before fix but not inserted anymore
+--disable_result_log
+select * from counters;
+select * from counters;
+select * from counters;
+--enable_result_log
+show status like "Qcache_queries_in_cache";
+show status like "Qcache_inserts";
+
+# Turn off query cache
+SET GLOBAL query_cache_size=default;
+SET GLOBAL query_cache_type=default;
+
+--source ndbinfo_drop.inc

=== modified file 'sql/ha_ndbinfo.h'
--- a/sql/ha_ndbinfo.h	2010-01-25 10:04:59 +0000
+++ b/sql/ha_ndbinfo.h	2011-02-01 14:58:21 +0000
@@ -72,6 +72,11 @@ public:
 
   bool get_error_message(int error, String *buf);
 
+  uint8 table_cache_type() {
+    // Don't put ndbinfo results in query cache
+    return HA_CACHE_TBL_NOCACHE;
+  }
+
 private:
   void unpack_record(uchar *dst_row);
 

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110201145821-pmfqmdoi2xmreq2r.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4160) Bug#59831Magnus Blåudd1 Feb