4161 Magnus Blåudd 2011-02-01
ndb
- mark up MCP patch for bug58082
modified:
sql/rpl_injector.cc
sql/rpl_injector.h
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
4159 Jonas Oreland 2011-02-01
ndb - fix one more GCPNoMoreTrans missed in previous commit
modified:
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
=== 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);
=== modified file 'sql/rpl_injector.cc'
--- a/sql/rpl_injector.cc 2010-03-12 06:06:23 +0000
+++ b/sql/rpl_injector.cc 2011-02-01 14:58:55 +0000
@@ -93,6 +93,7 @@ int injector::transaction::commit()
DBUG_RETURN(error);
}
+#ifndef MCP_BUG58082
int injector::transaction::rollback()
{
DBUG_ENTER("injector::transaction::rollback()");
@@ -100,6 +101,7 @@ int injector::transaction::rollback()
end_trans(m_thd, ROLLBACK);
DBUG_RETURN(0);
}
+#endif
int injector::transaction::use_table(server_id_type sid, table tbl)
{
=== modified file 'sql/rpl_injector.h'
--- a/sql/rpl_injector.h 2009-05-26 18:53:34 +0000
+++ b/sql/rpl_injector.h 2011-02-01 14:58:55 +0000
@@ -212,6 +212,7 @@ public:
*/
int commit();
+#ifndef MCP_BUG58082
/*
Rollback a transaction.
@@ -219,6 +220,7 @@ public:
for example, releasing resource and unlocking files.
*/
int rollback();
+#endif
/*
Get the position for the start of the transaction.
No bundle (reason: useless for push emails).| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:4159 to 4161) | Magnus Blåudd | 1 Feb |