From: Date: September 8 2005 10:57pm Subject: bk commit into 4.1 tree (serg:1.2408) BUG#12695 List-Archive: http://lists.mysql.com/internals/29530 X-Bug: 12695 Message-Id: <20050908205740.14272.qmail@serg.mysql.com> Below is the list of changes that have just been committed into a local 4.1 repository of serg. When serg 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.2408 05/09/08 22:57:27 serg@stripped +3 -0 BUG#12695: Item_func_isnull::update_used_tables did not update const_item_cache sql/item_cmpfunc.h 1.109 05/09/08 22:57:19 serg@stripped +1 -1 BUG#12695: Item_func_isnull::update_used_tables did not update const_item_cache mysql-test/t/group_by.test 1.43 05/09/08 22:57:18 serg@stripped +10 -0 BUG#12695: Item_func_isnull::update_used_tables did not update const_item_cache mysql-test/r/group_by.result 1.52 05/09/08 22:57:18 serg@stripped +9 -0 BUG#12695: Item_func_isnull::update_used_tables did not update const_item_cache # 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: serg # Host: serg.mylan # Root: /usr/home/serg/Abk/mysql-4.1 --- 1.108/sql/item_cmpfunc.h Sat Aug 13 06:45:07 2005 +++ 1.109/sql/item_cmpfunc.h Thu Sep 8 22:57:19 2005 @@ -805,7 +805,7 @@ public: else { args[0]->update_used_tables(); - if (!(used_tables_cache=args[0]->used_tables())) + if ((const_item_cache= !(used_tables_cache= args[0]->used_tables()))) { /* Remember if the value is always NULL or never NULL */ cached_value= (longlong) args[0]->is_null(); --- 1.51/mysql-test/r/group_by.result Thu Aug 4 15:42:24 2005 +++ 1.52/mysql-test/r/group_by.result Thu Sep 8 22:57:18 2005 @@ -764,3 +764,12 @@ select date(left(f1+0,8)) from t1 group date(left(f1+0,8)) 2005-06-06 drop table t1; +create table t1(f1 varchar(5) key); +insert into t1 values (1),(2); +select sql_buffer_result max(f1) is null from t1; +max(f1) is null +0 +select sql_buffer_result max(f1)+1 from t1; +max(f1)+1 +3 +drop table t1; --- 1.42/mysql-test/t/group_by.test Thu Aug 4 15:39:35 2005 +++ 1.43/mysql-test/t/group_by.test Thu Sep 8 22:57:18 2005 @@ -600,4 +600,14 @@ insert into t1 values('2005-06-06'); select date(left(f1+0,8)) from t1 group by 1; drop table t1; +# +# BUG#12695: Item_func_isnull::update_used_tables +# did not update const_item_cache +# +create table t1(f1 varchar(5) key); +insert into t1 values (1),(2); +select sql_buffer_result max(f1) is null from t1; +select sql_buffer_result max(f1)+1 from t1; +drop table t1; + # End of 4.1 tests