From: Date: June 13 2007 8:05pm Subject: bk commit into 5.0 tree (dkatz:1.2533) BUG#28897 List-Archive: http://lists.mysql.com/commits/28694 X-Bug: 28897 Message-Id: <20070613180520.EE60048E140@damien-katzs-computer.local> 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:05:14-04:00, dkatz@stripped +3 -0 Bug #28897 UUID() returns non-unique values when query cache is enabled Removed the ability to cache queries with UUID(). mysql-test/r/query_cache.result@stripped, 2007-06-13 14:05:12-04:00, dkatz@stripped +5 -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:05:12-04:00, dkatz@stripped +21 -0 Added test to ensure "select UUID(), a from t1" is different each time. sql/item_create.cc@stripped, 2007-06-13 14:05:12-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:05:12 -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:05:12 -04:00 @@ -1409,3 +1409,8 @@ 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; +drop table t1; +create table t1 (a char); +insert into t1 values ('c'); +a --- 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:05:12 -04:00 @@ -970,4 +970,25 @@ set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_size= default; +drop table t1; + + +# +# 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 echoing of the queries because the UUIDs are different each run. +--disable_query_log +eval select a from t1 where "$q1" = "$q2"; +--enable_query_log + +drop table t1; + # End of 5.0 tests