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.2463 05/11/10 22:22:46 evgen@stripped +3 -0
Fix bug #14482 Wrongly applied optimization in resolve_const_item() caused
crash
While applying optimization, resolve_const_item() changed Item_cache to
Item_null. Later Item_cache's function was called for Item_null object,
which caused server crash.
resolve_const_item() changed to skip Item_cache from optimization.
mysql-test/r/select.result
1.71 05/11/10 22:22:08 evgen@stripped +8 -0
Test case for bug #14482 Wrongly applied optimization in resolve_const_item() caused
crash
mysql-test/t/select.test
1.54 05/11/10 22:21:22 evgen@stripped +11 -0
Test case for bug #14482 Wrongly applied optimization in resolve_const_item() caused
crash
sql/item.cc
1.229 05/11/10 22:20:20 evgen@stripped +2 -1
Fix bug #14482 Wrongly applied optimization in resolve_const_item() caused
crash
resolve_const_item() changed to skip Item_cache from optimization.
# 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/14482-bug-4.1-mysql
--- 1.228/sql/item.cc 2005-10-25 20:01:39 +04:00
+++ 1.229/sql/item.cc 2005-11-10 22:20:20 +03:00
@@ -2908,7 +2908,8 @@
DBUG_ASSERT(item_row->cols() == comp_item_row->cols());
col= item_row->cols();
while (col-- > 0)
- resolve_const_item(thd, item_row->addr(col), comp_item_row->el(col));
+ if (item_row->el(col)->type() != Item::CACHE_ITEM)
+ resolve_const_item(thd, item_row->addr(col), comp_item_row->el(col));
}
else
{ // It must REAL_RESULT
--- 1.70/mysql-test/r/select.result 2005-10-27 18:35:50 +04:00
+++ 1.71/mysql-test/r/select.result 2005-11-10 22:22:08 +03:00
@@ -2706,3 +2706,11 @@
count(f2) >0
1
drop table t1,t2;
+create table t1 (f1 int,f2 int);
+insert into t1 values(1,1);
+create table t2 (f3 int, f4 int, primary key(f3,f4));
+insert into t2 values(1,1);
+select * from t1 where f1 in (select f3 from t2 where (f3,f4)= (select f3,f4 from t2));
+f1 f2
+1 1
+drop table t1,t2;
--- 1.53/mysql-test/t/select.test 2005-10-27 17:44:26 +04:00
+++ 1.54/mysql-test/t/select.test 2005-11-10 22:21:22 +03:00
@@ -2237,4 +2237,15 @@
insert into t2 values (1,1),(1,2);
select distinct count(f2) >0 from t1 left join t2 on f1=f3 group by f1;
drop table t1,t2;
+
+#
+# Bug #14482 Server crash when subselecting from the same table
+#
+create table t1 (f1 int,f2 int);
+insert into t1 values(1,1);
+create table t2 (f3 int, f4 int, primary key(f3,f4));
+insert into t2 values(1,1);
+select * from t1 where f1 in (select f3 from t2 where (f3,f4)= (select f3,f4 from t2));
+drop table t1,t2;
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (evgen:1.2463) BUG#14482 | eugene | 10 Nov |