-
Roy Lyseng authored
Patch 1 - fix crash (part 2 of problem) This problem appears to have two parts: 1. When the stored procedure/prepared statement is executed two times, it is optimized differently on the second execution, and 2. When the first execution uses semi-join materialization, and the second does not, a crash during optimization may occur. This patch handles the crash that occurs during second execution, a later patch will handle the different optimization. The root cause of the crash is that a dangling pointer is left after first execution: The sj_mat_exec field of TABLE_LIST for a semi-join nest. The solution is a slight refactoring, so that the TABLE_LIST no longer refers Semijoin_mat_exec, instead the Semijoin_mat_exec contains a pointer to the TABLE_LIST object. At the same time the definition of Semijoin_mat_exec is moved from sql_class.h into sql_executor.h (it is an execution struct).
Roy Lyseng authoredPatch 1 - fix crash (part 2 of problem) This problem appears to have two parts: 1. When the stored procedure/prepared statement is executed two times, it is optimized differently on the second execution, and 2. When the first execution uses semi-join materialization, and the second does not, a crash during optimization may occur. This patch handles the crash that occurs during second execution, a later patch will handle the different optimization. The root cause of the crash is that a dangling pointer is left after first execution: The sj_mat_exec field of TABLE_LIST for a semi-join nest. The solution is a slight refactoring, so that the TABLE_LIST no longer refers Semijoin_mat_exec, instead the Semijoin_mat_exec contains a pointer to the TABLE_LIST object. At the same time the definition of Semijoin_mat_exec is moved from sql_class.h into sql_executor.h (it is an execution struct).
Loading