On Wed, Apr 21, 2010 at 06:39:22 -0000, marko.makela@stripped wrote:
> #At file:///home/marko/innobase/dev/mysql/5.1-innodb/ based on
> revid:marko.makela@stripped
>
> 3407 Marko Mäkelä 2010-04-21
> rec_convert_dtuple_to_rec(): Add a debug check.
>
> modified:
> storage/innodb_plugin/rem/rem0rec.c
> === modified file 'storage/innodb_plugin/rem/rem0rec.c'
> --- a/storage/innodb_plugin/rem/rem0rec.c 2010-02-20 16:45:41 +0000
> +++ b/storage/innodb_plugin/rem/rem0rec.c 2010-04-21 06:39:16 +0000
> @@ -1215,11 +1215,20 @@ rec_convert_dtuple_to_rec(
> mem_heap_t* heap = NULL;
> ulint offsets_[REC_OFFS_NORMAL_SIZE];
> const ulint* offsets;
> + ulint i;
> rec_offs_init(offsets_);
>
> offsets = rec_get_offsets(rec, index,
> offsets_, ULINT_UNDEFINED, &heap);
> ut_ad(rec_validate(rec, offsets));
> + ut_ad(dtuple_get_n_fields(dtuple)
> + == rec_offs_n_fields(offsets));
> +
> + for (i = 0; i < rec_offs_n_fields(offsets); i++) {
> + ut_ad(dfield_is_ext(dtuple_get_nth_field(dtuple, i))
> + == rec_offs_nth_extern(offsets, i));
> + }
> +
[...]
What about surrounding the whole for loop in a #ifdef UNIV_DEBUG?
--
Vasil Dimov
moc.elcaro@stripped Software Developer @ Oracle/Innobase Oy
gro.DSBeerF@dv Committer @ FreeBSD.org
gro.d5v@dv Home @ Sofia, Bulgaria
Attachment: [application/pgp-signature]