1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-30 11:22:14 +03:00
Files
mariadb/mysql-test/t
Chaithra Gopalareddy 6a0d03fce7 Bug#13012483:EXPLAIN EXTENDED, PREPARED STATEMENT, CRASH IN
CHECK_SIMPLE_EQUALITY

PROBLEM:
Crash in "check_simple_equality" when using a subquery with "IN" and
"ALL" in prepare.

ANALYSIS:
Crash can be reproduced using a simplified query like this one:
prepare s from "select 1 from g1 where 1 < all (
                select @:=(1 in (select 1 from g1)) from g1)";

This bug is currently present only on 5.5.and 5.1. Its fixed as part
of work log(#1110) in 5.6. We are taking one change to fix this
in 5.5 and 5.1.

Problem seems to be present because we are trying to evaluate "is_null"
on an argument which is part of a subquery
(In Item_is_not_null_test::update_used_tables()).
But the condition to evaluate is only when we do not have a sub query
present, which means to say that "with_subselect" is not set.
With respect to the above query, we create an object of type
"Item_in_optimizer" which by definition is always associated with a
subquery. While in 5.6 we set "with_subselect" to true for
"Item_in_optimizer" object, we do not do the same in 5.5. This results in
the evaluation for "is_null" resulting in a coredump.
So, we are now setting "with_subselect" to true for "Item_in_optimizer"
in 5.1 and 5.5.


mysql-test/r/func_in.result:
  Result file changes for the test case added
mysql-test/t/func_in.test:
  Test case added for Bug#13012483
sql/item_cmpfunc.h:
  Changed Item_in_optimizer::Item_in_optimizer( ) to set "with_subselect"
  to true
2012-02-24 11:53:36 +05:30
..
2010-02-25 23:13:11 +04:00
2011-01-25 12:14:28 +05:30
2010-03-09 16:09:32 +01:00
2009-09-29 17:38:40 +02:00
2010-12-14 12:33:03 +03:00
2011-05-04 17:12:45 +02:00
2009-05-06 15:00:14 +05:30
2011-12-14 14:41:40 +01:00
2009-10-20 11:00:07 -07:00
2011-03-29 10:09:05 +02:00
2010-12-14 12:33:03 +03:00
2010-01-29 16:54:27 +02:00
2009-08-12 12:03:05 +02:00
2011-01-26 16:50:21 +01:00
2010-10-15 20:13:35 +05:00
2012-01-26 10:25:23 +01:00
2009-07-03 10:19:32 +02:00
2011-08-09 11:42:07 +04:00
2009-06-10 11:58:36 +03:00
2011-09-29 10:56:21 +01:00