Commit dc12b09d authored by Marko Mäkelä's avatar Marko Mäkelä

Revert changes to rec_offs_data_size() and friends

Do not exclude instantly dropped columns from the size of the record.
This has to be handled at the upper level, by row_build() and the
to-be-written replacement of row_build_index_entry(), called
row_build_clust_index_entry().

Hopefully only a small number of functions will have to directly
access those clustered index record fields that can be reordered
or instantly dropped.
parent 9642c8f6
......@@ -884,16 +884,7 @@ rec_get_nth_field_offs(
if (n == 0) {
offs = 0;
} else {
offs = rec_offs_base(offsets)[n];
if (offs & REC_OFFS_DROP_COL
|| offs & REC_OFFS_DROP_SQL_NULL) {
ulint len;
offs = offs & REC_OFFS_MASK;
rec_get_nth_field_offs(offsets, n-1, &len);
offs -= len;
} else {
offs = offs & REC_OFFS_MASK;
}
offs = rec_offs_base(offsets)[n] & REC_OFFS_MASK;
}
ulint length = rec_offs_base(offsets)[1 + n];
......@@ -1272,12 +1263,6 @@ rec_offs_data_size(
ut_ad(rec_offs_validate(NULL, NULL, offsets));
ulint n = rec_offs_n_fields(offsets);
while (rec_offs_base(offsets)[n] & REC_OFFS_DROP_COL
|| rec_offs_base(offsets)[n] & REC_OFFS_DROP_SQL_NULL) {
n--;
}
size = rec_offs_base(offsets)[n] & REC_OFFS_MASK;
ut_ad(size < srv_page_size);
return(size);
......
......@@ -2638,11 +2638,7 @@ rec_validate(
<< " len " << len;
return(FALSE);
}
if (!rec_offs_nth_drop_col(offsets, i)
&& !rec_offs_nth_drop_sql_null(offsets, i)) {
len_sum += len;
}
len_sum += len;
break;
case UNIV_SQL_DEFAULT:
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment