-
Roy Lyseng authored
When MAX_INDEXES is > 64, Key_map uses a special template implementation. However, the fields keys_in_use_for_group_by and keys_in_use_for_order_by were not initialized when used by a temporary table. This was OK when using a Bitmap<64> template, but causes failure when using the special template. The solution is to explicitly initialize the two fields. In addition, it was detected that argument key_to_save to is_set() in TABLE::use_index() could be negative, this was corrected. To prevent further problems like this, more asserts on valid arguments were added in sql_bitmap.h. No test case was added to this bugfix: A special configuration is needed to trigger the problem, and several queries in the test suite are vulnerable (all queries with materialized derived tables with equality test on non-indexed columns). However, the problem is not met in any standard test suite, since none of them use the option MAX_INDEXES=128.
Roy Lyseng authoredWhen MAX_INDEXES is > 64, Key_map uses a special template implementation. However, the fields keys_in_use_for_group_by and keys_in_use_for_order_by were not initialized when used by a temporary table. This was OK when using a Bitmap<64> template, but causes failure when using the special template. The solution is to explicitly initialize the two fields. In addition, it was detected that argument key_to_save to is_set() in TABLE::use_index() could be negative, this was corrected. To prevent further problems like this, more asserts on valid arguments were added in sql_bitmap.h. No test case was added to this bugfix: A special configuration is needed to trigger the problem, and several queries in the test suite are vulnerable (all queries with materialized derived tables with equality test on non-indexed columns). However, the problem is not met in any standard test suite, since none of them use the option MAX_INDEXES=128.
Loading