Below is the list of changes that have just been committed into a local
4.1 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.2324 05/07/04 23:02:08 evgen@stripped +3 -0
Fix bug#11482 4.1.12 produces different resultset for a complex query
than in previous 4.1.x
Wrongly applied optimization was adding NOT NULL constraint which results in
reduced result set.
mysql-test/r/select.result
1.57 05/07/04 22:50:16 evgen@stripped +11 -0
Test case for bug#11482 4.1.12 produces different resultset for a complex query than
in previous 4.1.x
mysql-test/t/select.test
1.40 05/07/04 22:49:17 evgen@stripped +12 -0
Test case for bug#11482 4.1.12 produces different resultset for a complex query than
in previous 4.1.x
sql/sql_select.cc
1.417 05/07/04 22:48:37 evgen@stripped +2 -0
Fix bug#11482 4.1.12 produces different resultset for a complex query than in previous
4.1.x
# 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/mysql-4.1-bug-11482
--- 1.416/sql/sql_select.cc 2005-06-28 14:23:59 +04:00
+++ 1.417/sql/sql_select.cc 2005-07-04 22:48:37 +04:00
@@ -3538,6 +3538,8 @@
DBUG_ASSERT(item->type() == Item::FIELD_ITEM);
Item_field *not_null_item= (Item_field*)item;
JOIN_TAB *referred_tab= not_null_item->field->table->reginfo.join_tab;
+ if (referred_tab->join != join)
+ continue;
Item_func_isnotnull *notnull;
if (!(notnull= new Item_func_isnotnull(not_null_item)))
DBUG_VOID_RETURN;
--- 1.56/mysql-test/r/select.result 2005-05-24 18:50:09 +04:00
+++ 1.57/mysql-test/r/select.result 2005-07-04 22:50:16 +04:00
@@ -2515,3 +2515,14 @@
b
9223372036854775808
DROP TABLE t1;
+create table t1 (f1 int);
+insert into t1 values (1),(NULL);
+create table t2 (f2 int, f3 int, f4 int);
+create index idx1 on t2 (f4);
+insert into t2 values (1,2,3),(2,4,6);
+select A.f2 from t1 left join t2 A on A.f2 = f1 left join t2 B
+on B.f3 = (select min(f2) from t2 C where A.f4 = C.f4);
+f2
+1
+NULL
+drop table t1,t2;
--- 1.39/mysql-test/t/select.test 2005-05-24 18:50:09 +04:00
+++ 1.40/mysql-test/t/select.test 2005-07-04 22:49:17 +04:00
@@ -2060,3 +2060,15 @@
INSERT INTO t1 VALUES (0x8000000000000000);
SELECT b FROM t1 WHERE b=0x8000000000000000;
DROP TABLE t1;
+
+#
+# Bug #11482 4.1.12 produces different resultset for a complex query
+# than in previous 4.1.x
+create table t1 (f1 int);
+insert into t1 values (1),(NULL);
+create table t2 (f2 int, f3 int, f4 int);
+create index idx1 on t2 (f4);
+insert into t2 values (1,2,3),(2,4,6);
+select A.f2 from t1 left join t2 A on A.f2 = f1 left join t2 B
+ on B.f3 = (select min(f2) from t2 C where A.f4 = C.f4);
+drop table t1,t2;
| Thread |
|---|
| • bk commit into 4.1 tree (evgen:1.2324) BUG#11482 | eugene | 4 Jul |