diff options
Diffstat (limited to 'sql/opt_split.cc')
-rw-r--r-- | sql/opt_split.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/opt_split.cc b/sql/opt_split.cc index 99082813d7f..c64d60398b3 100644 --- a/sql/opt_split.cc +++ b/sql/opt_split.cc @@ -741,7 +741,12 @@ void JOIN::add_keyuses_for_splitting() if (ext_keyuses_for_splitting->push(keyuse_ext_end)) goto err; - spl_opt_info->unsplit_card= join_record_count; + /* + Use the number of rows that was computed by + TABLE_LIST::fetch_number_of_rows(): + */ + spl_opt_info->unsplit_card= + select_lex->master_unit()->derived->table->stat_records(); rec_len= table->s->rec_buff_length; |