Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2022 06/02/15 22:46:16 msvensson@neptunus.(none) +2 -0
Bug#16795 ndb_cache_multi2
- remove timing dependent part of test, wait until condition occurs or sleep max 10 seconds
mysql-test/t/ndb_cache_multi2.test
1.4 06/02/15 22:46:12 msvensson@neptunus.(none) +19 -8
Convert long sleeps to a while leep whith small sleeps and a check if condition has occured.
This allows slower machines to sleep longer if needed.
mysql-test/r/ndb_cache_multi2.result
1.3 06/02/15 22:46:12 msvensson@neptunus.(none) +2 -5
Update test results
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug16795/my50-bug16795
--- 1.2/mysql-test/r/ndb_cache_multi2.result 2005-02-21 11:45:48 +01:00
+++ 1.3/mysql-test/r/ndb_cache_multi2.result 2006-02-15 22:46:12 +01:00
@@ -64,13 +64,10 @@
3
show status like "Qcache_queries_in_cache";
Variable_name Value
-Qcache_queries_in_cache 2
+Qcache_queries_in_cache 3
show status like "Qcache_inserts";
Variable_name Value
-Qcache_inserts 3
-show status like "Qcache_hits";
-Variable_name Value
-Qcache_hits 0
+Qcache_inserts 4
drop table t1, t2;
set GLOBAL query_cache_size=0;
set GLOBAL ndb_cache_check_time=0;
--- 1.3/mysql-test/t/ndb_cache_multi2.test 2005-04-21 11:11:17 +02:00
+++ 1.4/mysql-test/t/ndb_cache_multi2.test 2006-02-15 22:46:12 +01:00
@@ -24,10 +24,6 @@
reset query cache;
flush status;
-# Sleep so that the query cache check thread has time to start
-sleep 15;
-
-
# Create test tables in NDB and load them into cache
# on server1
connection server1;
@@ -53,19 +49,34 @@
show status like "Qcache_hits";
update t1 set a=3 where a=2;
-# Sleep so that the query cache check thread has time to run
-sleep 5;
-
# Connect to server1 and check that cache is invalidated
# and correct data is returned
connection server1;
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
+
+# Loop and wait for max 10 seconds until query cache thread
+# has invalidated the cache and the column a in t1 is equal to 3
+let $retries=20;
+while (`select a != 3 from t1`)
+{
+ dec $retries;
+ if (!$retries)
+ {
+ The query_cache thread failed to invalidate query_cache in 10 seconds;
+ }
+ sleep 0.5;
+}
+
+# Select from t1 one last time for the result file
+# Column a should be 3
select * from t1;
+
+# There should now be three queries in the cache
show status like "Qcache_queries_in_cache";
+# And inserts should be four
show status like "Qcache_inserts";
-show status like "Qcache_hits";
drop table t1, t2;
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2022) BUG#16795 | msvensson | 15 Feb |