Bug#37870: Usage of uninitialized value caused failed assertion.
The convert_constant_item function converts a constant to integer using field for condition like 'field = a_constant'. When the convert_constant_item is called for a subquery the outer select is already being executed, so convert_constant_item saves field's value to prevent its corruption. For EXPLAIN field's value isn't initialized thus when convert_constant_item tries to restore saved value it fails assertion. Now the convert_constant_item doesn't save/restore field's value for EXPLAIN. mysql-test/r/explain.result: Added a test case for the bug#37870. mysql-test/t/explain.test: Added a test case for the bug#37870. sql/item_cmpfunc.cc: Bug#37870: Usage of uninitialized value caused failed assertion. Now the convert_constant_item doesn't save/restore field's value for EXPLAIN.
Showing
Please register or sign in to comment