diff options
author | Satya B <satya.bn@sun.com> | 2009-06-22 16:58:00 +0530 |
---|---|---|
committer | Satya B <satya.bn@sun.com> | 2009-06-22 16:58:00 +0530 |
commit | 7d0675f613db96ad38af626d6cd504c04501092d (patch) | |
tree | 268e4b5c1fa1279c5c66b983d6c97dc27dae5c40 /storage/innobase | |
parent | 5ce0b41fb247c004da35f3eaa49f38cb395d00dd (diff) | |
download | mariadb-git-7d0675f613db96ad38af626d6cd504c04501092d.tar.gz |
Applying InnoDB snashot 5.1-ss5343, Fixes BUG#45357
1. BUG#45357 - 5.1.35 crashes with Failing assertion: index->type & DICT_CLUSTERED
2. Also fixes the compilation problem when the flag -DUNIV_MUST_NOT_INLINE
Detailed revision comments:
r5340 | marko | 2009-06-17 12:11:49 +0300 (Wed, 17 Jun 2009) | 4 lines
branches/5.1: row_unlock_for_mysql(): When the clustered index is unknown,
refuse to unlock the record.
(Bug #45357, caused by the fix of Bug #39320).
rb://132 approved by Sunny Bains.
r5339 | marko | 2009-06-17 11:01:37 +0300 (Wed, 17 Jun 2009) | 2 lines
branches/5.1: Add missing #include "mtr0log.h" so that the code compiles
with -DUNIV_MUST_NOT_INLINE.
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/btr/btr0cur.c | 1 | ||||
-rw-r--r-- | storage/innobase/include/trx0rseg.ic | 1 | ||||
-rw-r--r-- | storage/innobase/row/row0mysql.c | 9 | ||||
-rw-r--r-- | storage/innobase/trx/trx0rec.c | 1 |
4 files changed, 10 insertions, 2 deletions
diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c index 54acdf73db6..d2a2e4d2157 100644 --- a/storage/innobase/btr/btr0cur.c +++ b/storage/innobase/btr/btr0cur.c @@ -23,6 +23,7 @@ Created 10/16/1994 Heikki Tuuri #include "btr0cur.ic" #endif +#include "mtr0log.h" #include "page0page.h" #include "rem0rec.h" #include "rem0cmp.h" diff --git a/storage/innobase/include/trx0rseg.ic b/storage/innobase/include/trx0rseg.ic index eb1893587a6..577cd0dee7b 100644 --- a/storage/innobase/include/trx0rseg.ic +++ b/storage/innobase/include/trx0rseg.ic @@ -7,6 +7,7 @@ Created 3/26/1996 Heikki Tuuri *******************************************************/ #include "srv0srv.h" +#include "mtr0log.h" /********************************************************************** Gets a rollback segment header. */ diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index 2d9ed4fc944..6ec466cf995 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -1529,9 +1529,14 @@ row_unlock_for_mysql( index = btr_pcur_get_btr_cur(clust_pcur)->index; } + if (UNIV_UNLIKELY(!(index->type & DICT_CLUSTERED))) { + /* This is not a clustered index record. We + do not know how to unlock the record. */ + goto no_unlock; + } + /* If the record has been modified by this transaction, do not unlock it. */ - ut_a(index->type & DICT_CLUSTERED); if (index->trx_id_offset) { rec_trx_id = trx_read_trx_id(rec @@ -1568,7 +1573,7 @@ row_unlock_for_mysql( prebuilt->select_lock_type); } } - +no_unlock: mtr_commit(&mtr); } diff --git a/storage/innobase/trx/trx0rec.c b/storage/innobase/trx/trx0rec.c index 50f8b011463..38ad53fcfb0 100644 --- a/storage/innobase/trx/trx0rec.c +++ b/storage/innobase/trx/trx0rec.c @@ -23,6 +23,7 @@ Created 3/26/1996 Heikki Tuuri #include "que0que.h" #include "trx0purge.h" #include "row0row.h" +#include "mtr0log.h" /*=========== UNDO LOG RECORD CREATION AND DECODING ====================*/ |