Below is the list of changes that have just been committed into a local
4.1 repository of bar. When bar 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.2147 05/03/24 18:10:46 bar@stripped +4 -0
Fixed that LEFT OUTER JOIN was replaced with a regulat join
in some cases, because "charset(x) = 'string'" was considered
as "x is not null" due to incorrect not_null_tables().
sql/item_strfunc.h
1.92 05/03/24 18:08:03 bar@stripped +4 -0
Fixed that LEFT OUTER JOIN was replaced with a regulat join
in some cases, because "charset(x) = 'string'" was considered
as "x is not null" due to incorrect not_null_tables().
sql/item_func.h
1.120 05/03/24 18:08:03 bar@stripped +2 -1
Fixed that LEFT OUTER JOIN was replaced with a regulat join
in some cases, because "charset(x) = 'string'" was considered
as "x is not null" due to incorrect not_null_tables().
mysql-test/t/func_str.test
1.71 05/03/24 18:08:03 bar@stripped +14 -0
Fixed that LEFT OUTER JOIN was replaced with a regulat join
in some cases, because "charset(x) = 'string'" was considered
as "x is not null" due to incorrect not_null_tables().
mysql-test/r/func_str.result
1.90 05/03/24 18:08:03 bar@stripped +20 -0
Fixed that LEFT OUTER JOIN was replaced with a regulat join
in some cases, because "charset(x) = 'string'" was considered
as "x is not null" due to incorrect not_null_tables().
# 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: bar
# Host: bar.intranet.mysql.r18.ru
# Root: /usr/home/bar/mysql-4.1
--- 1.119/sql/item_func.h 2005-02-22 14:51:19 +04:00
+++ 1.120/sql/item_func.h 2005-03-24 18:08:03 +04:00
@@ -616,7 +616,8 @@
Item_func_coercibility(Item *a) :Item_int_func(a) {}
longlong val_int();
const char *func_name() const { return "coercibility"; }
- void fix_length_and_dec() { max_length=10; }
+ void fix_length_and_dec() { max_length=10; maybe_null= 0; }
+ table_map not_null_tables() const { return 0; }
};
class Item_func_locate :public Item_int_func
--- 1.91/sql/item_strfunc.h 2005-03-04 14:18:04 +04:00
+++ 1.92/sql/item_strfunc.h 2005-03-24 18:08:03 +04:00
@@ -641,7 +641,9 @@
{
collation.set(system_charset_info);
max_length= 64 * collation.collation->mbmaxlen; // should be enough
+ maybe_null= 0;
};
+ table_map not_null_tables() const { return 0; }
};
class Item_func_collation :public Item_str_func
@@ -654,7 +656,9 @@
{
collation.set(system_charset_info);
max_length= 64 * collation.collation->mbmaxlen; // should be enough
+ maybe_null= 0;
};
+ table_map not_null_tables() const { return 0; }
};
class Item_func_crc32 :public Item_int_func
--- 1.89/mysql-test/r/func_str.result 2005-03-16 16:52:30 +04:00
+++ 1.90/mysql-test/r/func_str.result 2005-03-24 18:08:03 +04:00
@@ -636,6 +636,26 @@
select charset(null), collation(null), coercibility(null);
charset(null) collation(null) coercibility(null)
binary binary 5
+CREATE TABLE t1 (a int, b int);
+CREATE TABLE t2 (a int, b int);
+INSERT INTO t1 VALUES (1,1),(2,2);
+INSERT INTO t2 VALUES (2,2),(3,3);
+select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
+where collation(t2.a) = _utf8'binary' order by t1.a,t2.a;
+a b a b
+1 1 NULL NULL
+2 2 2 2
+select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
+where charset(t2.a) = _utf8'binary' order by t1.a,t2.a;
+a b a b
+1 1 NULL NULL
+2 2 2 2
+select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
+where coercibility(t2.a) = 2 order by t1.a,t2.a;
+a b a b
+1 1 NULL NULL
+2 2 2 2
+DROP TABLE t1, t2;
select SUBSTR('abcdefg',3,2);
SUBSTR('abcdefg',3,2)
cd
--- 1.70/mysql-test/t/func_str.test 2005-03-16 16:52:30 +04:00
+++ 1.71/mysql-test/t/func_str.test 2005-03-24 18:08:03 +04:00
@@ -376,6 +376,20 @@
select charset(a), collation(a), coercibility(a) from t1;
drop table t1;
select charset(null), collation(null), coercibility(null);
+#
+# Make sure OUTER JOIN is not replaced with a regular joun
+#
+CREATE TABLE t1 (a int, b int);
+CREATE TABLE t2 (a int, b int);
+INSERT INTO t1 VALUES (1,1),(2,2);
+INSERT INTO t2 VALUES (2,2),(3,3);
+select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
+where collation(t2.a) = _utf8'binary' order by t1.a,t2.a;
+select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
+where charset(t2.a) = _utf8'binary' order by t1.a,t2.a;
+select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
+where coercibility(t2.a) = 2 order by t1.a,t2.a;
+DROP TABLE t1, t2;
#
# test for SUBSTR
| Thread |
|---|
| • bk commit into 4.1 tree (bar:1.2147) | bar | 24 Mar |