Below is the list of changes that have just been committed into a local
4.1 repository of bell. When bell 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.2323 05/06/28 18:56:45 bell@stripped +3 -0
fixed not_null_tables() for IN() (BUG#9393)
(IN() remove NULL rows only for tables from first argument (value which we looking for
in IN() list) but not for tables from IN() list)
Also it will be better change Item::not_null_tables() to prohibit this optimisation by
default for new created items in 5.0 or 5.1.
sql/item_cmpfunc.h
1.107 05/06/28 18:56:05 bell@stripped +6 -0
correct not_null_tables() for IN
mysql-test/t/select.test
1.40 05/06/28 18:56:05 bell@stripped +15 -0
IN with outer join condition
mysql-test/r/select.result
1.57 05/06/28 18:56:05 bell@stripped +9 -0
IN with outer join condition
# 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: bell
# Host: sanja.is.com.ua
# Root: /home/bell/mysql/bk/work-4.1
--- 1.106/sql/item_cmpfunc.h Wed May 4 16:05:53 2005
+++ 1.107/sql/item_cmpfunc.h Tue Jun 28 18:56:05 2005
@@ -769,6 +769,12 @@
bool nulls_in_row();
bool is_bool_func() { return 1; }
CHARSET_INFO *compare_collation() { return cmp_collation.collation; }
+ /*
+ IN() protect from NULL only first argument, if construction like
+ "expression IN ()" will be allowed, we will need to check number of
+ argument here, because "NULL IN ()" is TRUE.
+ */
+ table_map not_null_tables() const { return args[0]->not_null_tables(); }
};
/* Functions used by where clause */
--- 1.56/mysql-test/r/select.result Tue May 24 17:50:09 2005
+++ 1.57/mysql-test/r/select.result Tue Jun 28 18:56:05 2005
@@ -2515,3 +2515,12 @@
b
9223372036854775808
DROP TABLE t1;
+CREATE TABLE `t1` ( `gid` int(11) default NULL, `uid` int(11) default NULL);
+CREATE TABLE `t2` ( `ident` int(11) default NULL, `level` char(16) default NULL);
+INSERT INTO `t2` VALUES (0,'READ');
+CREATE TABLE `t3` ( `id` int(11) default NULL, `name` char(16) default NULL);
+INSERT INTO `t3` VALUES (1,'fs');
+select * from t3 left join t1 on t3.id = t1.uid, t2 where t2.ident in (0, t1.gid, t3.id,
0);
+id name gid uid ident level
+1 fs NULL NULL 0 READ
+drop table t1,t2,t3;
--- 1.39/mysql-test/t/select.test Tue May 24 17:50:09 2005
+++ 1.40/mysql-test/t/select.test Tue Jun 28 18:56:05 2005
@@ -2060,3 +2060,18 @@
INSERT INTO t1 VALUES (0x8000000000000000);
SELECT b FROM t1 WHERE b=0x8000000000000000;
DROP TABLE t1;
+
+#
+# IN with outer join condition (BUG#9393)
+#
+CREATE TABLE `t1` ( `gid` int(11) default NULL, `uid` int(11) default NULL);
+
+CREATE TABLE `t2` ( `ident` int(11) default NULL, `level` char(16) default NULL);
+INSERT INTO `t2` VALUES (0,'READ');
+
+CREATE TABLE `t3` ( `id` int(11) default NULL, `name` char(16) default NULL);
+INSERT INTO `t3` VALUES (1,'fs');
+
+select * from t3 left join t1 on t3.id = t1.uid, t2 where t2.ident in (0, t1.gid, t3.id,
0);
+
+drop table t1,t2,t3;
| Thread |
|---|
| • bk commit into 4.1 tree (bell:1.2323) BUG#9393 | sanja | 28 Jun |