Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf 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-03-22 11:50:24+04:00, holyfoot@hfmain.(none) +3 -0
Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
MERGE: 1.1810.2373.167
mysql-test/r/func_in.result@stripped, 2007-03-22 11:50:21+04:00, holyfoot@hfmain.(none) +0
-0
Auto merged
MERGE: 1.28.1.6
mysql-test/t/func_in.test@stripped, 2007-03-22 11:50:21+04:00, holyfoot@hfmain.(none) +0 -0
Auto merged
MERGE: 1.22.1.6
sql/item_cmpfunc.cc@stripped, 2007-03-22 11:50:21+04:00, holyfoot@hfmain.(none) +0 -0
Auto merged
MERGE: 1.187.1.53
# 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: holyfoot
# Host: hfmain.(none)
# Root: /home/hf/work/mrg/mysql-5.1-opt/RESYNC
--- 1.254/sql/item_cmpfunc.cc 2007-03-22 11:50:30 +04:00
+++ 1.255/sql/item_cmpfunc.cc 2007-03-22 11:50:30 +04:00
@@ -2458,7 +2458,8 @@ void in_decimal::set(uint pos, Item *ite
dec->len= DECIMAL_BUFF_LENGTH;
dec->fix_buffer_pointer();
my_decimal *res= item->val_decimal(dec);
- if (res != dec)
+ /* if item->val_decimal() is evaluated to NULL then res == 0 */
+ if (!item->null_value && res != dec)
my_decimal2decimal(res, dec);
}
--- 1.39/mysql-test/r/func_in.result 2007-03-22 11:50:30 +04:00
+++ 1.40/mysql-test/r/func_in.result 2007-03-22 11:50:30 +04:00
@@ -477,6 +477,11 @@ a
Warnings:
Warning 1292 Incorrect date value: '19772-07-29' for column 'a' at row 1
DROP TABLE t1,t2,t3,t4;
+CREATE TABLE t1 (id int not null);
+INSERT INTO t1 VALUES (1),(2);
+SELECT id FROM t1 WHERE id IN(4564, (SELECT IF(1=0,1,1/0)) );
+id
+DROP TABLE t1;
End of 5.0 tests
create table t1(f1 char(1));
insert into t1 values ('a'),('b'),('1');
--- 1.30/mysql-test/t/func_in.test 2007-03-22 11:50:30 +04:00
+++ 1.31/mysql-test/t/func_in.test 2007-03-22 11:50:30 +04:00
@@ -361,6 +361,17 @@ SELECT * FROM t4 WHERE a IN ('1972-02-06
DROP TABLE t1,t2,t3,t4;
+#
+# BUG#27362: IN with a decimal expression that may return NULL
+#
+
+CREATE TABLE t1 (id int not null);
+INSERT INTO t1 VALUES (1),(2);
+
+SELECT id FROM t1 WHERE id IN(4564, (SELECT IF(1=0,1,1/0)) );
+
+DROP TABLE t1;
+
--echo End of 5.0 tests
| Thread |
|---|
| • bk commit into 5.1 tree (holyfoot:1.2507) | holyfoot | 22 Mar |