diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-06-18 02:18:19 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-06-18 02:18:19 +0300 |
commit | 1efc292be6c92316b16eef70b289f6e1ab7f2a33 (patch) | |
tree | 5a7046b5480dc7cb310b0b430a6a686599037f20 /innobase/row/row0vers.c | |
parent | b518744d16a516c842c4ec0382c8ab44a38aebca (diff) | |
download | mariadb-git-1efc292be6c92316b16eef70b289f6e1ab7f2a33.tar.gz |
row0vers.c, row0sel.c, row0ins.c:
Fix bug: InnoDB could print that it cannot find a clustered index record if an update undo, purge, and a consistent read coincided, in rare cases it might also have returned a wrong row in a query
innobase/row/row0ins.c:
Fix bug: InnoDB could print that it cannot find a clustered index record if an update undo, purge, and a consistent read coincided, in rare cases it might also have returned a wrong row in a query
innobase/row/row0sel.c:
Fix bug: InnoDB could print that it cannot find a clustered index record if an update undo, purge, and a consistent read coincided, in rare cases it might also have returned a wrong row in a query
innobase/row/row0vers.c:
Fix bug: InnoDB could print that it cannot find a clustered index record if an update undo, purge, and a consistent read coincided, in rare cases it might also have returned a wrong row in a query
Diffstat (limited to 'innobase/row/row0vers.c')
-rw-r--r-- | innobase/row/row0vers.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/innobase/row/row0vers.c b/innobase/row/row0vers.c index 91aaba40812..5395f5160e4 100644 --- a/innobase/row/row0vers.c +++ b/innobase/row/row0vers.c @@ -59,7 +59,6 @@ row_vers_impl_x_locked_off_kernel( ibool rec_del; ulint err; mtr_t mtr; - char err_buf[1000]; ut_ad(mutex_own(&kernel_mutex)); ut_ad(!rw_lock_own(&(purge_sys->latch), RW_LOCK_SHARED)); @@ -77,22 +76,17 @@ row_vers_impl_x_locked_off_kernel( clust_rec = row_get_clust_rec(BTR_SEARCH_LEAF, rec, index, &clust_index, &mtr); if (!clust_rec) { - rec_sprintf(err_buf, 900, rec); - - ut_print_timestamp(stderr); - fprintf(stderr, -" InnoDB: Error: cannot find the clustered index record\n" -"InnoDB: for a secondary index record in table %s index %s.\n" -"InnoDB: Secondary index record %s.\n" -"InnoDB: The table is probably corrupt. Please run CHECK TABLE on it.\n" -"InnoDB: You can try to repair the table by dump + drop + reimport.\n" -"InnoDB: Send a detailed bug report to mysql@lists.mysql.com.\n", - index->table_name, index->name, err_buf); - mutex_enter(&kernel_mutex); - mtr_commit(&mtr); - - /* We assume there is no lock on the record, though this - is not certain because the table is apparently corrupt */ + /* In a rare case it is possible that no clust rec is found + for a secondary index record: if in row0umod.c + row_undo_mod_remove_clust_low() we have already removed the + clust rec, while purge is still cleaning and removing + secondary index records associated with earlier versions of + the clustered index record. In that case there cannot be + any implicit lock on the secondary index record, because + an active transaction which has modified the secondary index + record has also modified the clustered index record. And in + a rollback we always undo the modifications to secondary index + records before the clustered index record. */ return(NULL); } |