1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
Files
mariadb/mysql-test/t
unknown b917fb63a6 Fix bug lp:1009187, mdev-373, mysql bug#58628
Analysis:
The queries in question use the [unique | index]_subquery execution methods.
These methods reuse the ref keys constructed by create_ref_for_key(). The
way create_ref_for_key() works is that it doesn't store in ref.key_copy[]
store_key elements that represent constants. In particular it doesn't store
the store_key for NULL constants.

The execution of [unique | index]_subquery calls
subselect_uniquesubquery_engine::copy_ref_key, which in addition to copy
the left IN argument into a index lookup key, is supposed to detect if
the left IN argument contains NULLs. Since the store_key for the NULL
constant is not copied into the key array, the null is not detected, and
execution erroneously proceeds as if it should look for a complete match.

Solution:
The solution (unlike MySQL) is to reuse already computed information about
NULL presence. Item_in_optimizer::val_int already finds out if the left IN
operand contains NULLs. The fix propagates this to the execution methods
subselect_[unique | index]subquery_engine::exec so it knows if there were
NULL values independent of the presence of keys.

In addition the patch siplifies copy_ref_key() and the logic that hanldes
the case of NULLs in the left IN operand.
2012-09-14 11:26:01 +03:00
..
2012-02-20 16:23:18 +02:00
2010-02-25 23:13:11 +04:00
2010-09-12 18:40:01 +02:00
2010-06-10 11:11:52 +02:00
2009-10-28 09:52:34 +02:00
2009-10-28 09:52:34 +02:00
2009-10-28 09:52:34 +02:00
2011-05-12 16:31:54 +02:00
2011-01-25 12:14:28 +05:30
2009-10-28 09:52:34 +02:00
2011-05-02 20:58:45 +03:00
2012-04-05 10:49:38 +02:00
2009-09-29 17:38:40 +02:00
2010-01-15 17:27:55 +02:00
2011-02-20 18:51:43 +02:00
2012-02-20 16:23:18 +02:00
2011-11-24 18:48:58 +02:00
2009-09-08 00:50:10 +04:00
2011-11-24 18:48:58 +02:00
2010-11-25 00:57:34 +02:00
2009-09-08 00:50:10 +04:00
2012-08-22 16:13:54 +02:00
2012-03-08 22:33:01 -08:00
2012-05-17 10:13:25 +03:00
2010-11-25 00:57:34 +02:00
2012-04-05 10:49:38 +02:00
2011-05-02 20:58:45 +03:00
2012-05-07 13:26:34 +03:00
2011-12-12 12:36:46 +02:00
2011-11-23 19:32:14 +02:00
2011-02-20 18:51:43 +02:00
2009-06-09 15:19:13 +02:00
2009-06-09 15:19:13 +02:00
2010-10-19 15:58:35 +02:00
2010-09-09 21:16:01 -07:00
2012-05-11 09:35:46 +03:00
2011-03-29 10:09:05 +02:00
2010-09-06 02:15:34 +03:00
2012-02-20 16:23:18 +02:00
2011-02-20 18:51:43 +02:00
2009-10-28 09:52:34 +02:00
2012-04-05 12:01:52 +02:00
2011-11-23 19:32:14 +02:00
2010-09-06 02:15:34 +03:00
2009-06-25 02:44:14 +04:00
2011-05-02 20:58:45 +03:00
2012-08-22 16:13:54 +02:00
2010-08-25 22:22:33 +02:00
2011-11-23 19:32:14 +02:00
2009-10-28 09:52:34 +02:00
2009-08-12 12:03:05 +02:00
2010-06-14 18:58:52 +02:00
2010-11-25 00:57:34 +02:00
2012-04-05 10:49:38 +02:00
2012-08-22 16:13:54 +02:00
2009-09-08 00:50:10 +04:00
2012-04-05 12:01:52 +02:00
2009-10-28 09:52:34 +02:00
2012-05-17 12:12:33 +02:00
2009-10-28 09:52:34 +02:00
2011-05-02 20:58:45 +03:00
2009-07-03 10:19:32 +02:00
2012-08-22 16:13:54 +02:00
2010-03-21 21:58:19 +01:00
2009-06-10 11:58:36 +03:00
2012-05-18 14:23:05 +02:00
2011-12-28 18:47:01 -08:00
2012-05-12 12:12:35 +04:00
2011-11-23 19:32:14 +02:00
2012-05-23 18:18:08 +03:00
2011-09-13 18:46:47 +03:00
2011-09-29 10:56:21 +01:00