1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fix for bug #18306: MySQL crashes and restarts using subquery

mysql-test/r/subselect.result:
  Fix for bug #18306: MySQL crashes and restarts using subquery
  test case
mysql-test/t/subselect.test:
  Fix for bug #18306: MySQL crashes and restarts using subquery
  test case
sql/opt_range.cc:
  Fix for bug #18306: MySQL crashes and restarts using subquery
  Restore thd->mem_root because
  during the cond->val_int() evaluation we can come across a subselect 
  item which may allocate memory on the thd->mem_root and assumes
  all the memory allocated has the same life span as the subselect
  item itself.
This commit is contained in:
unknown
2006-03-23 18:09:35 +04:00
parent 0ef3cd6c70
commit abffce9cad
3 changed files with 29 additions and 3 deletions

View File

@@ -3163,3 +3163,9 @@ t
crash1
crash1
drop table t1;
create table t1 (c int, key(c));
insert into t1 values (1142477582), (1142455969);
create table t2 (a int, b int);
insert into t2 values (2, 1), (1, 0);
delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1;
drop table t1, t2;