List:Commits« Previous MessageNext Message »
From:damien Date:June 13 2007 8:23pm
Subject:bk commit into 5.0 tree (dkatz:1.2533) BUG#28897
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of dkatz. When dkatz 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@stripped, 2007-06-13 14:23:25-04:00, dkatz@stripped +3 -0
  Bug #28897  	UUID() returns non-unique values when query cache is enabled
  
  Removed the ability to cache queries containing "UUID()".

  mysql-test/r/query_cache.result@stripped, 2007-06-13 14:23:22-04:00,
dkatz@stripped +7 -0
    Added test to ensure "select UUID(), a from t1" is different each time.

  mysql-test/t/query_cache.test@stripped, 2007-06-13 14:23:22-04:00,
dkatz@stripped +24 -0
    Added test to ensure "select UUID(), a from t1" is different each time.

  sql/item_create.cc@stripped, 2007-06-13 14:23:22-04:00, dkatz@stripped +1
-0
    Removed the ability to cache queries with UUID().

# 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:	dkatz
# Host:	damien-katzs-computer.local
# Root:	/Users/dkatz/50_win

--- 1.63/sql/item_create.cc	2007-05-09 15:17:20 -04:00
+++ 1.64/sql/item_create.cc	2007-06-13 14:23:22 -04:00
@@ -418,6 +418,7 @@ Item *create_func_unhex(Item* a)
 
 Item *create_func_uuid(void)
 {
+  current_thd->lex->safe_to_cache_query= 0;
   return new Item_func_uuid();
 }
 

--- 1.80/mysql-test/r/query_cache.result	2007-05-08 06:18:33 -04:00
+++ 1.81/mysql-test/r/query_cache.result	2007-06-13 14:23:22 -04:00
@@ -1405,7 +1405,14 @@ Only MyISAM tables	support collections	1
 Function MATCH ... AGAINST()	is used to do a search	1
 Full-text search in MySQL	implements vector space model	1
 drop function change_global;
+drop table t1;
 set GLOBAL query_cache_type=default;
 set GLOBAL query_cache_limit=default;
 set GLOBAL query_cache_min_res_unit=default;
+set GLOBAL query_cache_size= default;
+set GLOBAL query_cache_size=1000000;
+create table t1 (a char);
+insert into t1 values ('c');
+a
+drop table t1;
 set GLOBAL query_cache_size= default;

--- 1.59/mysql-test/t/query_cache.test	2007-05-08 05:24:05 -04:00
+++ 1.60/mysql-test/t/query_cache.test	2007-06-13 14:23:22 -04:00
@@ -965,9 +965,33 @@ delimiter ;|
 select *, change_global() from t1;
 drop function change_global;
 
+drop table t1;
+
 set GLOBAL query_cache_type=default;
 set GLOBAL query_cache_limit=default;
 set GLOBAL query_cache_min_res_unit=default;
+set GLOBAL query_cache_size= default;
+
+
+#
+# Bug #28897  	UUID() returns non-unique values when query cache is enabled
+#
+
+set GLOBAL query_cache_size=1000000;
+
+create table t1 (a char);
+insert into t1 values ('c');
+
+let $q1= `select UUID(), a from t1`;
+let $q2= `select UUID(), a from t1`; 
+
+# disabling the logging of the query because the UUIDs are different each run.
+--disable_query_log
+eval select a  from t1 where "$q1" = "$q2";
+--enable_query_log
+
+drop table t1;
+
 set GLOBAL query_cache_size= default;
 
 # End of 5.0 tests
Thread
bk commit into 5.0 tree (dkatz:1.2533) BUG#28897damien13 Jun