diff options
author | heikki@hundin.mysql.fi <> | 2005-04-06 10:27:40 +0300 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2005-04-06 10:27:40 +0300 |
commit | 0c2caeb4d82f49dd109a0495ead6242953e8b053 (patch) | |
tree | 306307907f4d766e18d97617852ce1ed4d3bf21f /innobase/btr | |
parent | 0134a2b286e8402932207e9f2c402c28448568bc (diff) | |
download | mariadb-git-0c2caeb4d82f49dd109a0495ead6242953e8b053.tar.gz |
row0sel.c, btr0pcur.c, btr0pcur.ic, btr0pcur.h:
Add diagnostic code to track assertion failure in ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other context
Diffstat (limited to 'innobase/btr')
-rw-r--r-- | innobase/btr/btr0pcur.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/innobase/btr/btr0pcur.c b/innobase/btr/btr0pcur.c index cf8a612ef28..0dcf6c2f3fc 100644 --- a/innobase/btr/btr0pcur.c +++ b/innobase/btr/btr0pcur.c @@ -14,6 +14,7 @@ Created 2/23/1996 Heikki Tuuri #include "ut0byte.h" #include "rem0cmp.h" +#include "trx0trx.h" /****************************************************************** Allocates memory for a persistent cursor object and initializes the cursor. */ @@ -203,7 +204,14 @@ btr_pcur_restore_position( ut_a(cursor->pos_state == BTR_PCUR_WAS_POSITIONED || cursor->pos_state == BTR_PCUR_IS_POSITIONED); - ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED); + if (cursor->old_stored != BTR_PCUR_OLD_STORED) { + ut_print_buf(stderr, (const byte*)cursor, sizeof(btr_pcur_t)); + if (cursor->trx_if_known) { + trx_print(stderr, cursor->trx_if_known); + } + + ut_a(0); + } if (cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE || cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE) { |