List:Commits« Previous MessageNext Message »
From:eugene Date:May 30 2006 7:05pm
Subject:bk commit into 5.0 tree (evgen:1.2161)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.2161 06/05/30 23:05:34 evgen@stripped +3 -0
  item_cmpfunc.cc, func_in.result, multi_update.result:
    After merge fix

  sql/item_cmpfunc.cc
    1.204 06/05/30 23:05:05 evgen@stripped +23 -0
    After merge fix

  mysql-test/r/func_in.result
    1.27 06/05/30 23:04:46 evgen@stripped +8 -0
    After merge fix

  mysql-test/r/multi_update.result
    1.44 06/05/30 23:04:34 evgen@stripped +1 -0
    After merge fix

# 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:	evgen
# Host:	moonbone.local
# Root:	/work/18360-bug-5.0-mysql-opt

--- 1.203/sql/item_cmpfunc.cc	2006-05-30 19:16:28 +04:00
+++ 1.204/sql/item_cmpfunc.cc	2006-05-30 23:05:05 +04:00
@@ -63,6 +63,27 @@
 }
 
 
+/*
+  Aggregates result types from the array of items.
+
+  SYNOPSIS:
+    agg_cmp_type()
+    type   [out] the aggregated type
+    items        array of items to aggregate the type from
+    nitems       number of items in the array
+
+  DESCRIPTION
+    This function aggregates result types from the array of items. Found type
+    supposed to be used later for comparison of values of these items.
+    Aggregation itself is performed by the item_cmp_type() function.
+
+  NOTES
+    Aggregation rules:
+    If all items are constants the type will be aggregated from all items.
+    If there are some non-constant items then only types of non-constant
+    items will be used for aggregation.
+*/
+
 static void agg_cmp_type(THD *thd, Item_result *type, Item **items, uint nitems)
 {
   uint i;
@@ -89,6 +110,8 @@
     }
     else if (is_const)
       type[0]= item_cmp_type(type[0], items[i]->result_type());
+    else if (field && convert_constant_item(thd, field, &items[i]))
+      type[0]= INT_RESULT;
   }
 }
 

--- 1.26/mysql-test/r/func_in.result	2006-05-30 19:16:28 +04:00
+++ 1.27/mysql-test/r/func_in.result	2006-05-30 23:04:46 +04:00
@@ -212,12 +212,20 @@
 f2
 0
 1
+Warnings:
+Warning	1292	Truncated incorrect INTEGER value: 'z'
 select f1 from t1 where 'z' in (1,f1);
 f1
 z
 select * from t1 where 'z' in (f2,f1);
 f1	f2
+1	0
+a	1
 z	2
+Warnings:
+Warning	1292	Truncated incorrect DOUBLE value: 'z'
+Warning	1292	Truncated incorrect DOUBLE value: 'z'
+Warning	1292	Truncated incorrect DOUBLE value: 'z'
 select * from t1 where 1 in (f2,f1);
 f1	f2
 1	0

--- 1.43/mysql-test/r/multi_update.result	2006-05-29 19:07:33 +04:00
+++ 1.44/mysql-test/r/multi_update.result	2006-05-30 23:04:34 +04:00
@@ -480,6 +480,7 @@
 create table t2(a int);
 delete from t1,t2 using t1,t2 where t1.a=(select a from t1);
 ERROR HY000: You can't specify target table 't1' for update in FROM clause
+drop table t1, t2;
 create table t1 ( c char(8) not null ) engine=innodb;
 insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
 insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
Thread
bk commit into 5.0 tree (evgen:1.2161)eugene30 May