Martin Hansson
4f4d03a416
Bug#51070: Query with a NOT IN subquery predicate returns a wrong result set
...
The EXISTS transformation has additional switches to catch the known corner
cases that appear when transforming an IN predicate into EXISTS. Guarded
conditions are used which are deactivated when a NULL value is seen in the
outer expression's row. When the inner query block supplies NULL values,
however, they are filtered out because no distinction is made between the
guarded conditions; guarded NOT x IS NULL conditions in the HAVING clause that
filter out NULL values cannot be de-activated in isolation from those that
match values or from the outer expression or NULL's.
The above problem is handled by making the guarded conditions remember whether
they have rejected a NULL value or not, and index access methods are taking
this into account as well.
The bug consisted of
1) Not resetting the property for every nested loop iteration on the inner
query's result.
2) Not propagating the NULL result properly from inner query to IN optimizer.
3) A hack that may or may not have been needed at some point. According to a
comment it was aimed to fix #2 by returning NULL when FALSE was actually
the result. This caused failures when #2 was properly fixed. The hack is
now removed.
The fix resolves all three points.
2010-09-07 11:21:09 +02:00
..
2009-08-25 15:56:50 +02:00
2010-05-24 21:54:08 +08:00
2009-12-18 14:00:30 +02:00
2009-10-30 11:40:44 +02:00
2009-05-15 12:15:56 +02:00
2010-03-25 23:57:06 +04:00
2009-08-20 14:30:59 +02:00
2009-02-09 22:00:15 +01:00
2010-02-25 23:13:11 +04:00
2010-05-28 00:07:40 +04:00
2009-07-10 15:00:34 +03:00
2010-02-02 14:17:21 +02:00
2010-04-22 15:52:00 +02:00
2010-04-22 15:52:00 +02:00
2009-09-18 16:01:18 +03:00
2009-09-18 16:01:18 +03:00
2009-11-25 12:25:49 +05:30
2009-11-30 10:54:26 +05:30
2009-05-21 13:06:43 +05:00
2009-01-31 22:04:57 -02:00
2009-02-05 21:47:23 +01:00
2009-05-15 12:15:56 +02:00
2009-02-09 22:00:15 +01:00
2009-05-25 17:19:20 +02:00
2009-05-11 20:54:00 -03:00
2009-06-08 20:03:01 -03:00
2009-12-22 13:52:23 +04:00
2010-05-24 21:54:08 +08:00
2010-01-16 15:44:24 +08:00
2009-02-05 13:49:32 +04:00
2010-03-09 16:09:32 +01:00
2009-03-19 12:20:28 +04:00
2010-05-24 21:54:08 +08:00
2009-07-24 11:27:23 +05:00
2009-09-07 13:42:54 +08:00
2010-03-22 16:27:59 +04:00
2009-05-05 11:55:22 +05:00
2010-04-06 12:26:59 +05:00
2009-12-03 13:22:34 +04:00
2009-05-15 12:15:56 +02:00
2009-05-15 12:15:56 +02:00
2009-09-29 17:38:40 +02:00
2009-11-18 13:49:45 +01:00
2010-08-31 02:16:38 +04:00
2009-07-11 23:44:29 +05:00
2009-03-03 21:34:18 +01:00
2010-06-04 10:53:18 +02:00
2009-09-06 00:42:17 +04:00
2009-05-15 12:15:56 +02:00
2010-06-29 10:28:17 +02:00
2009-03-11 17:30:56 -03:00
2009-05-15 12:15:56 +02:00
2009-08-27 15:17:09 +02:00
2010-05-19 11:18:59 +02:00
2009-05-15 12:15:56 +02:00
2009-05-15 12:15:56 +02:00
2010-05-29 22:16:45 +04:00
2009-05-15 12:15:56 +02:00
2010-05-24 21:54:08 +08:00
2009-03-03 21:34:18 +01:00
2009-10-20 11:00:07 -07:00
2009-05-15 12:15:56 +02:00
2009-12-22 17:52:15 +02:00
2010-03-25 16:08:21 +04:00
2009-06-19 11:27:19 +02:00
2010-04-03 00:30:22 +04:00
2009-05-27 14:20:57 +04:00
2009-04-17 18:52:57 +03:00
2009-04-27 15:05:01 +05:00
2010-07-23 15:52:54 +04:00
2010-08-27 13:44:35 +04:00
2010-06-22 22:53:08 +04:00
2010-06-08 10:22:40 +04:00
2010-06-20 02:02:58 +04:00
2009-07-21 19:56:35 +02:00
2010-08-01 22:12:36 +04:00
2009-02-06 18:25:08 +01:00
2009-06-16 16:36:15 +02:00
2010-03-26 09:49:35 +04:00
2010-08-13 16:05:46 +03:00
2010-03-25 15:49:01 +04:00
2010-08-30 11:51:46 +04:00
2009-10-29 22:06:10 -07:00
2009-10-20 11:47:57 +05:30
2009-10-27 12:09:19 +04:00
2010-05-04 17:03:28 +03:00
2010-07-30 16:35:06 +03:00
2010-06-11 09:38:29 +02:00
2010-06-09 14:45:04 +04:00
2010-07-09 14:39:47 +04:00
2009-05-06 15:00:14 +05:30
2009-03-14 21:58:23 +03:00
2009-09-28 13:25:47 +02:00
2010-06-25 12:01:47 +04:00
2009-07-06 18:20:17 -04:00
2009-04-02 13:00:44 +02:00
2009-02-09 19:03:52 +04:00
2009-02-09 19:03:52 +04:00
2010-05-28 00:07:40 +04:00
2009-09-02 18:58:17 +02:00
2009-04-28 20:12:18 +02:00
2010-08-09 13:39:59 +02:00
2010-06-01 11:54:06 +04:00
2010-04-27 00:46:52 +04:00
2009-10-20 11:00:07 -07:00
2010-07-14 14:54:51 +03:00
2009-10-19 13:44:44 +05:00
2009-08-28 18:49:16 -03:00
2009-08-28 18:49:16 -03:00
2009-12-18 18:32:55 -02:00
2010-05-28 00:07:40 +04:00
2009-02-02 22:20:25 +01:00
2009-03-05 15:22:33 +01:00
2010-05-12 13:19:12 +02:00
2009-06-15 20:27:27 -03:00
2010-02-26 09:22:48 -03:00
2009-08-27 15:17:09 +02:00
2009-03-11 17:30:56 -03:00
2009-10-27 14:09:36 +04:00
2009-09-09 14:38:50 +05:00
2009-09-09 14:38:50 +05:00
2009-09-09 14:38:50 +05:00
2009-08-28 16:13:27 +02:00
2009-02-17 18:22:48 +04:00
2009-02-18 16:09:46 +04:00
2010-06-25 15:59:44 +03:00
2010-03-19 10:01:02 +04:00
2010-03-12 10:33:16 +04:00
2009-06-08 19:18:31 -03:00
2010-09-07 09:58:05 +02:00
2009-04-06 12:31:17 +05:30
2009-10-14 16:26:16 +05:00
2009-05-04 14:35:16 +05:30
2009-09-17 16:33:23 +05:00
2010-03-12 14:43:30 +04:00
2009-04-07 17:06:15 +05:30
2010-07-30 09:17:10 -03:00
2010-07-01 12:05:09 +03:00
2009-03-25 11:47:41 +03:00
2009-06-17 20:10:48 +04:00
2009-12-17 12:06:36 -08:00
2009-04-02 18:34:18 -04:00
2009-09-07 13:42:54 +08:00
2010-08-03 18:27:45 +08:00
2009-05-20 18:31:10 -07:00
2009-05-22 10:38:17 -04:00
2009-03-02 11:03:13 +01:00
2010-05-20 17:38:01 +02:00
2010-06-03 10:31:26 +02:00
2010-06-03 10:31:26 +02:00
2010-08-04 10:52:45 +02:00
2009-11-03 01:19:37 +01:00
2010-02-07 00:12:04 +00:00
2009-04-30 12:26:11 +02:00
2009-09-02 23:29:11 +02:00
2009-02-05 13:49:32 +04:00
2009-11-06 09:44:01 +03:00
2010-01-29 16:54:27 +02:00
2009-12-10 17:38:01 +02:00
2010-05-07 00:41:37 +04:00
2009-02-03 14:45:17 +01:00
2009-02-05 21:47:23 +01:00
2009-06-19 11:27:19 +02:00
2009-04-17 16:00:53 -04:00
2009-04-17 16:00:53 -04:00
2009-12-13 23:29:50 +03:00
2009-09-03 08:38:06 +02:00
2010-02-01 16:07:00 +01:00
2009-08-12 12:03:05 +02:00
2010-06-01 09:02:28 +02:00
2009-09-25 11:26:49 +02:00
2010-04-12 17:26:20 +03:00
2010-01-07 11:22:45 +01:00
2010-01-18 17:49:18 +01:00
2010-03-12 11:52:38 +01:00
2009-04-17 16:00:53 -04:00
2010-07-08 14:36:55 +02:00
2010-08-20 21:17:51 +02:00
2009-07-27 16:50:43 +05:30
2009-10-08 15:36:43 +02:00
2009-10-09 16:12:01 +02:00
2010-03-10 12:56:05 +01:00
2010-08-11 14:13:59 +02:00
2009-07-27 16:50:43 +05:30
2010-03-22 16:30:27 +04:00
2009-06-10 10:59:49 +02:00
2009-10-08 10:39:15 +02:00
2010-03-09 09:16:17 -03:00
2010-03-14 08:16:59 -03:00
2009-10-08 10:39:15 +02:00
2009-05-05 17:03:23 -04:00
2009-04-01 10:58:55 +02:00
2010-06-09 16:07:34 +04:00
2010-01-16 15:44:24 +08:00
2009-09-04 17:02:17 -03:00
2009-08-27 15:17:09 +02:00
2010-04-16 16:42:34 +05:00
2009-02-23 09:03:31 +01:00
2009-06-17 16:28:11 +02:00
2009-02-13 17:26:20 -02:00
2010-03-24 17:37:41 +01:00
2009-11-03 17:18:43 +01:00
2010-08-24 19:51:32 +04:00
2009-03-06 15:56:17 +01:00
2009-02-11 10:27:52 +01:00
2010-05-21 22:47:32 +04:00
2010-04-16 16:42:34 +05:00
2010-06-26 19:36:00 +02:00
2010-06-24 21:13:08 +04:00
2009-03-26 20:17:27 -03:00
2009-08-27 15:17:09 +02:00
2009-12-15 11:03:24 +02:00
2010-03-31 16:12:37 +03:00
2010-02-05 13:39:46 +04:00
2010-01-15 10:51:39 +02:00
2010-05-24 21:54:08 +08:00
2010-02-13 08:35:14 -02:00
2009-11-21 09:18:21 -02:00
2009-10-19 16:55:04 +03:00
2009-07-03 10:19:32 +02:00
2009-11-27 18:10:28 +02:00
2009-02-05 21:47:23 +01:00
2009-12-02 15:17:08 +04:00
2009-12-23 17:44:03 +04:00
2009-06-12 18:11:19 -03:00
2010-07-28 12:59:19 -03:00
2009-03-03 21:34:18 +01:00
2009-03-03 21:34:18 +01:00
2009-03-03 21:34:18 +01:00
2009-08-27 15:17:09 +02:00
2009-06-10 11:58:36 +03:00
2009-03-05 08:20:01 -03:00
2009-11-03 13:48:59 +01:00
2010-09-07 11:21:09 +02:00
2010-04-15 17:04:24 +03:00
2010-04-01 18:49:02 +04:00
2009-02-05 21:47:23 +01:00
2009-02-02 13:36:03 +02:00
2009-02-05 21:47:23 +01:00
2010-09-07 15:53:46 +07:00
2009-02-19 18:24:25 -05:00
2010-04-01 10:15:22 -03:00
2009-03-11 14:54:57 -06:00
2010-02-16 13:13:49 +04:00
2010-03-16 10:20:07 +01:00
2009-02-13 19:07:03 +01:00
2009-02-14 18:36:57 +03:00
2009-11-20 12:10:47 +02:00
2010-05-31 13:25:11 +04:00
2009-01-31 02:08:41 +01:00
2010-03-22 12:33:25 +04:00
2010-03-18 11:26:27 +01:00
2010-01-06 12:24:51 +02:00
2010-07-19 11:03:52 +02:00
2010-05-21 22:47:32 +04:00
2009-03-03 21:34:18 +01:00
2009-12-22 14:38:33 +04:00
2009-04-28 20:12:18 +02:00
2010-02-11 14:26:58 +01:00
2010-05-20 10:31:03 +04:00
2009-03-26 19:12:19 +01:00
2009-04-06 13:42:33 +02:00
2010-06-04 17:10:22 +03:00
2010-03-09 07:36:26 -03:00
2010-02-12 00:54:14 -02:00
2010-04-06 12:26:59 +05:00
2009-03-06 15:56:17 +01:00
2009-09-10 13:49:49 +05:00
2009-09-22 08:22:07 -03:00
2010-03-10 19:31:22 +04:00
2009-04-01 13:40:33 +05:00