1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-27 01:57:48 +03:00
Alexey Kopytov f6868a4eb4 Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
The problem was in incorrect handling of predicates involving 
NULL as a constant value by the range optimizer. 
 
For example, when creating a SEL_ARG node from a condition of 
the form "field < const" (which would normally result in the 
"NULL < field < const" SEL_ARG),  the special case when "const" 
is NULL was not taken into account, so "NULL < field < NULL" 
was produced for the "field < NULL" condition. 
 
As a result, SEL_ARG structures of this form could not be 
further optimized which in turn could lead to incorrectly 
constructed SEL_ARG trees. In particular, code assuming SEL_ARG 
structures to always form a sequence of ordered disjoint 
intervals could enter an infinite loop under some 
circumstances. 
 
Fixed by changing get_mm_leaf() so that for any sargable 
predicate except "<=>" involving NULL as a constant, "empty" 
SEL_ARG is returned, since such a predicate is always false. 

mysql-test/r/partition_pruning.result:
  Fixed a broken test case.
mysql-test/r/range.result:
  Added a test case for bug #47123.
mysql-test/r/subselect.result:
  Fixed a broken test cases.
mysql-test/t/range.test:
  Added a test case for bug #47123.
sql/opt_range.cc:
  Fixed get_mm_leaf() so that for any sargable
  predicate except "<=>" involving NULL as a constant, "empty"
  SEL_ARG is returned, since such a predicate is always false.
2009-10-17 00:19:51 +04:00
..
2008-04-02 10:06:36 +02:00
2009-08-27 15:59:25 +05:00
2009-02-10 16:27:35 +03:00
2009-09-10 11:58:13 +05:00
2009-08-20 14:30:59 +02:00
2009-09-03 08:38:06 +02:00
2009-01-23 13:22:05 +01:00
2009-06-25 13:44:50 +05:00
2009-08-10 15:46:20 -03:00
2008-11-21 17:32:45 +04:00
2008-09-03 13:06:03 +05:00
2009-09-04 12:39:56 +05:00
2009-07-15 15:43:45 +05:30
2009-06-01 16:00:38 +04:00
2009-03-27 10:18:06 +08:00
2008-09-05 13:36:02 +05:00
2009-02-07 16:50:31 +01:00
2009-09-10 15:30:03 +05:00
2009-01-23 13:22:05 +01:00
2009-04-29 07:59:10 +05:00
2009-02-26 18:17:06 +01:00
2009-02-03 14:45:17 +01:00
2009-05-06 15:00:14 +05:30
2009-06-15 17:36:51 +03:00
2009-02-10 16:27:35 +03:00
2009-09-02 18:58:17 +02:00
2009-04-09 14:38:50 +05:00
2009-03-16 20:54:50 +01:00
2008-10-23 21:27:09 +02:00
2009-01-26 15:20:33 +01:00
2009-02-19 18:22:28 +01:00
2009-02-03 14:45:17 +01:00
2009-09-10 11:54:26 +05:00
2008-07-03 23:41:22 +04:00
2009-02-19 17:59:00 +04:00
2008-04-02 10:06:36 +02:00
2009-06-10 11:58:36 +03:00
2009-09-28 16:48:40 +03:00
2008-07-07 11:43:56 +03:00
2008-12-13 19:42:12 +00:00
2009-02-09 22:00:15 +01:00
2009-02-19 18:24:25 -05:00
2009-01-13 15:04:28 +01:00
2009-02-14 20:14:10 +03:00
2009-05-15 12:42:57 +04:00
2009-05-15 12:11:07 +05:00
2009-05-10 21:20:35 +05:00
2009-08-31 17:09:09 +03:00