MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Hakan Kuecuekyilmaz Date:December 4 2008 3:50pm
Subject:bzr commit into mysql-6.0-falcon-team branch (hky:2925) Bug#41231
View as plain text  
#At file:///home/hakan/work/mysql/mysql-6.0-falcon-team-to-merge/ based on revid:hky@stripped

 2925 Hakan Kuecuekyilmaz	2008-12-04
      Fix for Bug#41231 falcon.falcon_bug_22181 test does not clean up after itself.
modified:
  mysql-test/suite/falcon/r/falcon_bug_22181.result
  mysql-test/suite/falcon/t/falcon_bug_22181.test

per-file messages:
  mysql-test/suite/falcon/r/falcon_bug_22181.result
    Adjusted result file.
  mysql-test/suite/falcon/t/falcon_bug_22181.test
    
    Reset global scope variable at the end of
    the test.
=== modified file 'mysql-test/suite/falcon/r/falcon_bug_22181.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_22181.result	2007-09-20 15:44:25 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_22181.result	2008-12-04 15:50:29 +0000
@@ -1,13 +1,14 @@
-SET STORAGE_ENGINE = Falcon;
-#---- Bug 22181 ----
+*** Bug #22181 ***
+SET @@storage_engine = 'Falcon';
 DROP DATABASE IF EXISTS falcon4;
 CREATE DATABASE falcon4;
-SET STORAGE_ENGINE = Falcon;
+SET @@storage_engine = 'Falcon';
 USE falcon4;
 USE falcon4;
 SHOW VARIABLES LIKE 'have_query_cache';
 Variable_name	Value
 have_query_cache	YES
+SELECT @@GLOBAL.query_cache_size INTO @previous_query_cache_size;
 SET GLOBAL query_cache_size = 200000;
 SET @@autocommit=0;
 CREATE TABLE t2 (s1 int, s2 varchar(1000), key(s1));
@@ -15,7 +16,7 @@ INSERT INTO t2 VALUES (1,repeat('a',1000
 COMMIT;
 START TRANSACTION;
 UPDATE t2 SET s2 = 'w' WHERE s1 = 10;
-SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
+SELECT SQL_CACHE count(*) FROM t2 WHERE s2 = 'w';
 count(*)
 0
 COMMIT;
@@ -23,14 +24,18 @@ USE falcon4;
 START TRANSACTION;
 INSERT INTO t2 VALUES (-1,'w');
 COMMIT;
-SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
+SELECT SQL_CACHE count(*) FROM t2 WHERE s2 = 'w';
 count(*)
 0
 COMMIT;
-SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
+SELECT SQL_CACHE count(*) FROM t2 WHERE s2 = 'w';
 count(*)
 1
-SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
+SELECT SQL_CACHE count(*) FROM t2 WHERE s2 = 'w';
 count(*)
 1
+SELECT count(*) FROM t2;
+count(*)
+3
+SET GLOBAL query_cache_size = @previous_query_cache_size;
 DROP DATABASE falcon4;

=== modified file 'mysql-test/suite/falcon/t/falcon_bug_22181.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_22181.test	2007-09-29 04:30:42 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_22181.test	2008-12-04 15:50:29 +0000
@@ -1,38 +1,47 @@
 --source include/have_falcon.inc
-SET STORAGE_ENGINE = Falcon;
+
 #
 # Bug #22181: Query cache becomes obsolete with two
 #                  interleaving transactions
 #
-# We should test this when query cache gets enabled in Falcon again (2006-7-11)
-#
---echo #---- Bug 22181 ----
+--echo *** Bug #22181 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
 --disable_warnings
 DROP DATABASE IF EXISTS falcon4;
 --enable_warnings
+
 CREATE DATABASE falcon4;
 
 # Establish connection1
 connect (connection1,localhost,root,,falcon4);
-SET STORAGE_ENGINE = Falcon;
+eval SET @@storage_engine = $engine;
 USE falcon4;
 
-
 connection default;
 USE falcon4;
 # This should be 'YES'.
 SHOW VARIABLES LIKE 'have_query_cache';
 
 # There should be no warnings.
+SELECT @@GLOBAL.query_cache_size INTO @previous_query_cache_size;
 SET GLOBAL query_cache_size = 200000;
 SET @@autocommit=0;
 CREATE TABLE t2 (s1 int, s2 varchar(1000), key(s1));
 INSERT INTO t2 VALUES (1,repeat('a',1000)),(2,repeat('a',1000));
 COMMIT;
+
+# ----------------------------------------------------- #
+# --- Test                                          --- #
+# ----------------------------------------------------- #
 START TRANSACTION;
 UPDATE t2 SET s2 = 'w' WHERE s1 = 10;
-SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
-
+SELECT SQL_CACHE count(*) FROM t2 WHERE s2 = 'w';
 
 connection connection1;
 COMMIT;
@@ -43,21 +52,26 @@ START TRANSACTION;
 INSERT INTO t2 VALUES (-1,'w');
 COMMIT;
 
-
 connection default;
-SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
+SELECT SQL_CACHE count(*) FROM t2 WHERE s2 = 'w';
 COMMIT;
 
 # The result is 0. With engine=innodb, the result would be 1.
-SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
-
+SELECT SQL_CACHE count(*) FROM t2 WHERE s2 = 'w';
 
 connection connection1;
 # The result is 0. With engine=innodb, the result would be 1.
-SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w';
+SELECT SQL_CACHE count(*) FROM t2 WHERE s2 = 'w';
 
-
-# Final cleanup
+# ----------------------------------------------------- #
+# --- Check                                         --- #
+# ----------------------------------------------------- #
+SELECT count(*) FROM t2;
+
+# ----------------------------------------------------- #
+# --- Final cleanup                                 --- #
+# ----------------------------------------------------- #
+disconnect connection1;
 connection default;
+SET GLOBAL query_cache_size = @previous_query_cache_size;
 DROP DATABASE falcon4;
-disconnect connection1;

Thread
bzr commit into mysql-6.0-falcon-team branch (hky:2925) Bug#41231Hakan Kuecuekyilmaz4 Dec