MDEV-31375 Assertion `dbl_records <= s->records' failed with optimizer_use_condition_selectivity=1
The reason for the crash wad that 'best splitting' optimization predicted less rows to be found than what opt_range did. This code in apply_selectivity_for_table(), when using use_cond_selectivity=1, was not prepared for this case which caused an assert in debug builds. Production builds is not affected. The fix is to choose the smaller of the two row counts. It will have a minimum on costs when using use_cond_selectivity=1 and should not cause any problems in production.
Showing
Please register or sign in to comment