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

 2926 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
  mysql-test/suite/falcon/t/falcon_unicode.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:45:11 +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:45:11 +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;

=== modified file 'mysql-test/suite/falcon/t/falcon_unicode.test'
--- a/mysql-test/suite/falcon/t/falcon_unicode.test	2008-12-04 14:51:57 +0000
+++ b/mysql-test/suite/falcon/t/falcon_unicode.test	2008-12-04 15:45:11 +0000
@@ -58,11 +58,12 @@ DROP TABLE IF EXISTS t_err;
 --enable_warnings
 
 # Reference table with MyISAM as storage engine.
-eval CREATE TABLE t0 (
-   id int auto_increment not null primary key,
-   a varchar(1) character set utf8,
-   category  varchar(100),
-   comment   varchar(80)
+eval
+CREATE TABLE t0 (
+  id int auto_increment not null primary key,
+  a varchar(1) character set utf8,
+  category  varchar(100),
+  comment   varchar(80)
 ) Engine $other_engine;
 
 # Falcon test table without any keys.
@@ -94,10 +95,12 @@ CREATE TABLE t5 (
 );
 
 # We collect any errors in this table.
-eval CREATE TABLE t_err (
+eval
+CREATE TABLE t_err (
   expected char(1) character set utf8,
   actual   char(1) character set utf8,
-  comment  varchar(120)
+  category  varchar(100),
+  comment   varchar(80)
 ) Engine $other_engine;
 
 #
@@ -157,6 +160,9 @@ SET a = (UNHEX((
 
 # Case tests?
 
+# Also test two UTF-8 characters with whitespace
+# like TAB in between.
+
 # ----------------------------------------------------- #
 # --- Check                                         --- #
 # ----------------------------------------------------- #

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