Commit 32f5958e authored by marko's avatar marko

rec_offs_nth_size(): Treat n==0 as a special case. (Bug #26835)

parent b76aeffe
...@@ -995,6 +995,9 @@ rec_offs_nth_size( ...@@ -995,6 +995,9 @@ rec_offs_nth_size(
{ {
ut_ad(rec_offs_validate(NULL, NULL, offsets)); ut_ad(rec_offs_validate(NULL, NULL, offsets));
ut_ad(n < rec_offs_n_fields(offsets)); ut_ad(n < rec_offs_n_fields(offsets));
if (!n) {
return(rec_offs_base(offsets)[1 + n] & REC_OFFS_MASK);
}
return((rec_offs_base(offsets)[1 + n] - rec_offs_base(offsets)[n]) return((rec_offs_base(offsets)[1 + n] - rec_offs_base(offsets)[n])
& REC_OFFS_MASK); & REC_OFFS_MASK);
} }
......
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