1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-19 19:03:26 +03:00
Files
mariadb/mysql-test/r
Sergey Petrunya 945a595aa3 BUG#834534: Assertion `0' failed in replace_where_subcondition with semijoin subquery in HAVING
- The problem was that the code that made the check whether the subquery is an AND-part of the WHERE 
  clause didn't work correctly for nested subqueries. In particular, grand-child subquery in HAVING was 
  treated as if it was in the WHERE, which eventually caused an assert when replace_where_subcondition
  looked for the subquery predicate in the WHERE and couldn't find it there.

- The fix: Removed implementation of "thd_marker approach". thd->thd_marker was used to determine the 
  location of subquery predicate: setup_conds() would set accordingly it when making the 

    {where|on_expr}->fix_fields(...)

  call so that AND-parts of the WHERE/ON clauses can determine they are the AND-parts. 
  Item_cond_or::fix_fields(), Item_func::fix_fields(), Item_subselect::fix_fields (this one was missed),
  and all other items-that-contain-items had to reset thd->thd_marker before calling fix_fields() for 
  their children items, so that the children can see they are not AND-parts of WHERE/ON.
- The "thd_marker approach" required that a lot of code in different locations maintains correct value of
  thd->thd_marker, so it was replaced with:
- The new approach with mark_as_condition_AND_part does not keep context in thd->thd_marker. Instead, 
  setup_conds() now calls

    {where|on_expr}->mark_as_condition_AND_part()

  and implementations of that function make sure that: 
   - parts of AND-expressions get the mark_as_condition_AND_part() call
   - Item_in_subselect objects record that they are AND-parts of WHERE/ON
2011-08-29 19:57:41 +04:00
..
2010-01-15 17:27:55 +02:00
2011-01-25 12:14:28 +05:30
2011-05-02 20:58:45 +03:00
2010-12-10 23:23:34 -08:00
2011-06-09 17:23:39 +02:00
2010-01-15 17:27:55 +02:00
2011-07-21 15:55:08 -07:00
2011-06-07 18:13:02 +02:00
2011-05-19 19:16:17 +02:00
2011-05-03 19:10:10 +03:00
2011-07-21 15:55:08 -07:00
2010-11-25 00:57:34 +02:00
2011-02-03 17:00:28 +02:00
2011-07-12 23:47:35 -07:00
2011-06-09 17:23:39 +02:00
2010-11-25 00:57:34 +02:00
2011-06-09 17:23:39 +02:00
2011-06-07 18:13:02 +02:00
2011-06-09 17:23:39 +02:00
2011-05-10 18:17:43 +03:00
2011-05-03 19:10:10 +03:00
2011-08-27 00:40:29 +03:00
2011-07-20 21:55:55 -07:00
2010-10-19 15:58:35 +02:00
2011-07-29 17:09:16 -07:00
2011-07-29 17:09:16 -07:00
2011-08-16 22:48:35 -07:00
2011-08-16 22:48:35 -07:00
2011-02-03 17:00:28 +02:00
2011-05-28 05:11:32 +03:00
2011-03-29 10:09:05 +02:00
2011-05-28 05:11:32 +03:00
2011-05-19 19:19:44 +02:00
2010-09-06 02:15:34 +03:00
2011-05-28 05:11:32 +03:00
2011-06-15 21:48:38 -07:00
2009-10-28 09:52:34 +02:00
2011-07-20 16:09:28 -07:00
2010-09-06 02:15:34 +03:00
2010-12-01 12:25:31 +05:30
2011-05-10 18:17:43 +03:00
2011-05-02 20:58:45 +03:00
2011-05-18 15:17:26 +02:00
2011-07-21 15:50:25 +03:00
2009-11-06 17:54:19 +03:00
2011-06-24 21:43:31 +04:00
2010-10-15 20:13:35 +05:00
2011-02-03 17:00:28 +02:00
2009-10-27 14:09:36 +04:00
2011-06-07 18:13:02 +02:00
2011-08-05 22:01:49 +04:00
2011-08-05 22:01:49 +04:00
2010-12-10 23:23:34 -08:00
2010-09-28 12:39:33 -07:00
2011-05-10 18:17:43 +03:00
2011-05-02 20:58:45 +03:00
2010-06-01 21:52:20 +02:00
2011-05-02 20:58:45 +03:00
2009-11-27 18:10:28 +02:00
2011-05-28 05:11:32 +03:00
2011-07-04 14:51:16 +03:00
2011-05-28 05:11:32 +03:00
2011-08-23 15:39:15 +03:00
2011-07-19 23:19:10 +03:00
2011-08-27 00:40:29 +03:00
2011-07-21 15:55:08 -07:00
2011-08-23 00:00:13 +03:00
2011-08-27 00:40:29 +03:00
2011-08-27 00:40:29 +03:00
2011-08-27 00:40:29 +03:00
2011-08-27 00:40:29 +03:00
2011-07-19 11:45:46 +04:00
2011-08-27 00:40:29 +03:00
2010-09-28 12:39:33 -07:00
2011-05-28 05:11:32 +03:00
2011-06-07 18:13:02 +02:00
2010-10-19 15:58:35 +02:00
2011-05-19 19:16:17 +02:00
2011-05-19 19:16:17 +02:00
2011-05-28 05:11:32 +03:00
2011-06-09 17:23:39 +02:00
2011-05-19 19:01:46 +02:00
2011-05-19 19:01:46 +02:00
2011-06-09 17:23:39 +02:00
2011-06-07 18:13:02 +02:00
2011-05-28 05:11:32 +03:00
2011-05-28 05:11:32 +03:00
2011-05-16 15:07:04 +03:00
2011-06-06 12:19:35 -07:00
2011-08-11 20:24:32 -07:00
2011-05-17 10:35:24 +03:00
2011-03-31 14:29:23 +02:00