1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#830993: Crash in end_read_record with derived table

- Let join buffering code correctly take into account rowids needed 
  by DuplicateElimination when it is calculating minimum record sizes.
- In JOIN_CACHE::write_record_data, added asserts that prevent us from 
  writing beyond the end of the buffer.
This commit is contained in:
Sergey Petrunya
2011-09-08 19:48:14 +04:00
parent 528598c478
commit 5673aa41c3
6 changed files with 268 additions and 19 deletions

View File

@ -288,7 +288,6 @@ typedef struct st_join_table {
ulong max_used_fieldlength;
uint used_blobs;
uint used_null_fields;
uint used_rowid_fields;
uint used_uneven_bit_fields;
enum join_type type;
bool cached_eq_ref_table,eq_ref_table,not_used_in_distinct;
@ -387,15 +386,6 @@ typedef struct st_join_table {
(select->quick->get_type() ==
QUICK_SELECT_I::QS_TYPE_GROUP_MIN_MAX));
}
bool check_rowid_field()
{
if (keep_current_rowid && !used_rowid_fields)
{
used_rowid_fields= 1;
used_fieldlength+= table->file->ref_length;
}
return test(used_rowid_fields);
}
bool is_inner_table_of_semi_join_with_first_match()
{
return first_sj_inner_tab != NULL;