1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00
Files
mariadb/mysql-test/t
unknown 4fa89b5fe0 Test case for bug lp:1001117, MySQL BUG#12330344
Analysis:
The problem in the original MySQL bug is that the range optimizer
performs its analysis in a separate MEM_ROOT object that is freed
after the range optimzier is done. During range analysis get_mm_tree
calls Item_func_like::select_optimize, which in turn evaluates its
right argument. In the test case the right argument is a subquery.

In MySQL, subqueries are optimized lazyly, thus the call to val_str
triggers optimization for the subquery. All objects needed by the
subquery plan end up in the temporary MEM_ROOT used by the range
optimizer. When execution ends, the JOIN::cleanup process tries to
cleanup objects of the subquery plan, but all these objects are gone
with the temporary MEM_ROOT. The solution for MySQL is to switch the
mem_root.

In MariaDB with the patch for bug lp:944706, all constant subqueries
that may be used by the optimization process are preoptimized. Therefore
Item_func_like::select_optimize only triggers subquery execution, and
the above problem is not present.

The patch however adds a test whether the evaluated right argument of
the LIKE predicate is expensive. This is consistent with our approach
not to evaluate expensive expressions during optimization.
2012-05-24 14:08:28 +03:00
..
2011-09-16 14:35:25 +02:00
2011-07-02 22:12:12 +02:00
2011-11-22 18:04:38 +01:00
2012-01-13 15:50:02 +01:00
2011-07-02 22:08:51 +02:00
2011-07-02 22:08:51 +02:00
2011-10-19 21:45:18 +02:00
2011-07-02 22:08:51 +02:00
2012-03-05 15:48:12 +02:00
2011-03-03 18:46:30 +03:00
2012-04-10 08:28:13 +02:00
2012-04-05 10:49:38 +02:00
2012-01-16 20:16:35 +01:00
2012-01-16 20:16:35 +01:00
2011-10-19 21:45:18 +02:00
2011-07-02 22:08:51 +02:00
2011-10-19 21:45:18 +02:00
2012-04-19 09:16:30 +03:00
2012-01-13 15:50:02 +01:00
2012-01-13 15:50:02 +01:00
2012-01-13 15:50:02 +01:00
2011-11-24 18:48:58 +02:00
2012-01-13 15:50:02 +01:00
2012-04-10 08:28:13 +02:00
2011-11-03 19:17:05 +01:00
2011-11-22 18:04:38 +01:00
2011-04-14 13:10:11 +04:00
2011-03-03 15:27:36 +03:00
2012-03-17 01:26:58 -07:00
2012-01-16 20:16:35 +01:00
2012-04-10 08:28:13 +02:00
2011-07-02 22:08:51 +02:00
2011-10-19 21:45:18 +02:00
2012-03-09 08:06:59 +01:00
2011-06-07 18:13:02 +02:00
2012-04-05 23:07:18 +02:00
2011-12-11 11:34:44 +02:00
2012-01-16 20:16:35 +01:00
2011-07-02 22:08:51 +02:00
2012-05-04 07:16:38 +02:00
2012-01-13 15:50:02 +01:00
2011-10-19 21:45:18 +02:00
2012-02-26 02:42:45 -08:00
2011-07-02 22:08:51 +02:00
2011-10-22 07:19:43 -07:00
2011-10-19 21:45:18 +02:00
2012-03-01 14:22:22 -08:00
2012-04-05 23:07:18 +02:00
2012-03-22 19:56:17 -07:00
2011-07-02 22:08:51 +02:00
2011-03-29 10:09:05 +02:00
2011-10-19 21:45:18 +02:00
2011-04-25 17:22:25 +02:00
2011-10-19 21:45:18 +02:00
2012-01-13 15:50:02 +01:00
2012-02-20 16:23:18 +02:00
2011-10-19 21:45:18 +02:00
2012-03-28 01:04:46 +02:00
2011-04-25 17:22:25 +02:00
2012-04-05 23:07:18 +02:00
2011-11-23 19:32:14 +02:00
2012-01-16 20:16:35 +01:00
2011-11-22 18:04:38 +01:00
2011-07-02 22:12:12 +02:00
2011-10-19 21:45:18 +02:00
2011-10-19 21:45:18 +02:00
2012-04-05 12:01:52 +02:00
2011-07-02 22:08:51 +02:00
2012-01-16 20:16:35 +01:00
2011-04-25 17:22:25 +02:00
2012-02-15 18:08:08 +01:00
2012-01-13 15:50:02 +01:00
2011-10-19 21:45:18 +02:00
2012-03-28 01:04:46 +02:00
2012-01-16 20:16:35 +01:00
2012-04-10 08:28:13 +02:00
2011-12-14 15:33:01 +01:00
2011-10-19 21:45:18 +02:00
2012-02-15 18:08:08 +01:00
2011-07-02 22:12:12 +02:00
2011-07-02 22:12:12 +02:00
2011-07-02 22:12:12 +02:00
2011-07-02 22:12:12 +02:00
2011-07-02 22:12:12 +02:00
2011-11-03 19:17:05 +01:00
2011-07-02 22:12:12 +02:00
2012-03-05 21:48:06 +01:00
2012-01-02 10:13:53 +01:00
2012-01-24 01:59:03 +01:00
2011-10-19 21:45:18 +02:00
2012-04-10 08:28:13 +02:00
2012-01-16 20:16:35 +01:00
2012-04-05 23:07:18 +02:00
2011-11-22 18:04:38 +01:00
2012-01-16 20:16:35 +01:00
2012-01-16 20:16:35 +01:00
2012-04-10 08:28:13 +02:00
2011-12-11 11:34:44 +02:00
2011-08-08 17:45:43 +01:00
2012-04-10 08:28:13 +02:00
2011-07-02 22:08:51 +02:00
2011-06-16 13:54:16 +03:00
2012-04-10 08:28:13 +02:00
2012-02-29 14:15:15 +05:30
2011-10-19 21:45:18 +02:00
2012-02-15 18:08:08 +01:00
2011-10-19 21:45:18 +02:00
2011-12-13 14:20:47 -08:00
2012-01-13 15:50:02 +01:00
2012-01-13 15:50:02 +01:00
2011-11-15 13:03:00 -08:00
2011-11-22 18:04:38 +01:00
2011-11-22 18:04:38 +01:00
2011-08-23 00:00:13 +03:00
2012-04-07 15:58:46 +02:00
2012-02-18 19:11:57 -08:00
2012-03-12 18:08:40 +04:00
2011-12-28 18:47:01 -08:00
2011-07-02 22:12:12 +02:00
2011-05-28 05:11:32 +03:00
2011-07-02 22:08:51 +02:00
2012-01-13 15:50:02 +01:00
2011-10-19 21:45:18 +02:00
2012-05-04 07:16:38 +02:00
2011-06-09 17:23:39 +02:00
2012-01-13 15:50:02 +01:00
2012-01-13 15:50:02 +01:00
2011-06-09 17:23:39 +02:00
2011-10-19 21:45:18 +02:00
2012-03-01 14:22:22 -08:00
2011-04-25 17:22:25 +02:00
2012-01-13 15:50:02 +01:00
2012-01-13 15:50:02 +01:00
2012-04-10 08:28:13 +02:00
2011-07-02 22:08:51 +02:00
2011-03-31 14:29:23 +02:00
2012-04-10 08:28:13 +02:00