Below is the list of changes that have just been committed into a local
5.0 repository of timka. When timka 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.1908 05/08/23 18:43:12 timour@stripped +2 -0
Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-2486
mysql-test/t/select.test
1.68 05/08/23 18:43:08 timour@stripped +0 -0
Auto merged
mysql-test/r/select.result
1.83 05/08/23 18:43:08 timour@stripped +0 -0
Auto merged
# 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: timour
# Host: lamia.home
# Root: /home/timka/mysql/src/5.0-2486/RESYNC
--- 1.82/mysql-test/r/select.result 2005-08-22 17:34:05 +03:00
+++ 1.83/mysql-test/r/select.result 2005-08-23 18:43:08 +03:00
@@ -1350,6 +1350,20 @@
250504 250505
250505 250505
insert into t2 (fld1, companynr) values (999999,99);
+select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr
is null;
+companynr companyname
+99 NULL
+select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
+count(*)
+1199
+explain select t2.companynr,companyname from t2 left join t4 using (companynr) where
t4.companynr is null;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1200
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr is null;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t4 ALL NULL NULL NULL NULL 12
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists
select companynr,companyname from t2 left join t4 using (companynr) where companynr is
null;
companynr companyname
select count(*) from t2 left join t4 using (companynr) where companynr is not null;
@@ -1362,6 +1376,18 @@
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
delete from t2 where fld1=999999;
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0 or t2.companynr < 0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0 and t4.companynr > 0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
explain select companynr,companyname from t4 left join t2 using (companynr) where
companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
@@ -1374,6 +1400,18 @@
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0 or t2.companynr is null;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t4 ALL NULL NULL NULL NULL 12
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
ifnull(t2.companynr,1)>0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t4 ALL NULL NULL NULL NULL 12
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
explain select companynr,companyname from t4 left join t2 using (companynr) where
companynr > 0 or companynr is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
--- 1.67/mysql-test/t/select.test 2005-08-22 17:34:05 +03:00
+++ 1.68/mysql-test/t/select.test 2005-08-23 18:43:08 +03:00
@@ -1538,6 +1538,11 @@
#
insert into t2 (fld1, companynr) values (999999,99);
+select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr
is null;
+select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
+explain select t2.companynr,companyname from t2 left join t4 using (companynr) where
t4.companynr is null;
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr is null;
+
select companynr,companyname from t2 left join t4 using (companynr) where companynr is
null;
select count(*) from t2 left join t4 using (companynr) where companynr is not null;
explain select companynr,companyname from t2 left join t4 using (companynr) where
companynr is null;
@@ -1547,10 +1552,18 @@
#
# Test left join optimization
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0;
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0 or t2.companynr < 0;
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0 and t4.companynr > 0;
+
explain select companynr,companyname from t4 left join t2 using (companynr) where
companynr > 0;
explain select companynr,companyname from t4 left join t2 using (companynr) where
companynr > 0 or companynr < 0;
explain select companynr,companyname from t4 left join t2 using (companynr) where
companynr > 0 and companynr > 0;
# Following can't be optimized
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0 or t2.companynr is null;
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where
ifnull(t2.companynr,1)>0;
+
explain select companynr,companyname from t4 left join t2 using (companynr) where
companynr > 0 or companynr is null;
explain select companynr,companyname from t4 left join t2 using (companynr) where
companynr > 0 or companynr < 0 or companynr > 0;
explain select companynr,companyname from t4 left join t2 using (companynr) where
ifnull(companynr,1)>0;
| Thread |
|---|
| • bk commit into 5.0 tree (timour:1.1908) | timour | 23 Aug |