-
Sergey Petrunya authored
Bug#48213 Materialized subselect crashes if using GEOMETRY type The problem occurred because during semi-join a materialized table was created which contained a GEOMETRY column, which is a specialized BLOB column. This caused an segmentation fault because such tables will have extra columns, and the semi-join code was not prepared for that. The solution is to disable materialization when Blob/Geometry columns would need to be materialized. Blob columns cannot be used for index look-up anyway, so it does not makes sense to use materialization. This fix implies that it is detected earlier that subquery materialization can not be used. The result of that is that in->exist optimization may be performed for such queries. Hence, extended query plans for such queries had to be updated. mysql-test/r/subselect_mat.result: Update extended query plan for subqueries that cannot use materialization due to Blobs. mysql-test/r/subselect_sj.result: Updated result file. mysql-test/r/subselect_sj_jcl6.result: Update result file. mysql-test/t/subselect_sj.test: Add test case for Bug#48213 that verifies that semi-join works when subquery select list contain Blob columns. Also verify that materialization is not used. sql/opt_subselect.cc: Disable materialization for semi-join/subqueries when the subquery select list contain Blob columns.
b9ba7c5c