Commit b618823f authored by marko's avatar marko

branches/zip: Note that it is legitimate for a secondary index record not

to be found during purge.  This tries to address Issue #129.  The comments
were supplied by Heikki.
parent b4f5736c
...@@ -20,7 +20,9 @@ Created 2/25/1997 Heikki Tuuri ...@@ -20,7 +20,9 @@ Created 2/25/1997 Heikki Tuuri
/*************************************************************** /***************************************************************
Undoes a fresh insert of a row to a table. A fresh insert means that Undoes a fresh insert of a row to a table. A fresh insert means that
the same clustered index unique key did not have any record, even delete the same clustered index unique key did not have any record, even delete
marked, at the time of the insert. */ marked, at the time of the insert. InnoDB is eager in a rollback:
if it figures out that an index record will be removed in the purge
anyway, it will remove it in the rollback. */
UNIV_INTERN UNIV_INTERN
ulint ulint
row_undo_ins( row_undo_ins(
......
...@@ -225,7 +225,15 @@ row_purge_remove_sec_if_poss_low( ...@@ -225,7 +225,15 @@ row_purge_remove_sec_if_poss_low(
found = row_search_index_entry(index, entry, mode, &pcur, &mtr); found = row_search_index_entry(index, entry, mode, &pcur, &mtr);
if (!found) { if (!found) {
/* Not found */ /* Not found. This is a legitimate condition. In a
rollback, InnoDB will remove secondary recs that would
be purged anyway. Then the actual purge will not find
the secondary index record. Also, the purge itself is
eager: if it comes to consider a secondary index
record, and notices it does not need to exist in the
index, it will remove it. Then if/when the purge
comes to consider the secondary index record a second
time, it will not exist any more in the index. */
/* fputs("PURGE:........sec entry not found\n", stderr); */ /* fputs("PURGE:........sec entry not found\n", stderr); */
/* dtuple_print(stderr, entry); */ /* dtuple_print(stderr, entry); */
......
...@@ -274,7 +274,9 @@ row_undo_ins_parse_undo_rec( ...@@ -274,7 +274,9 @@ row_undo_ins_parse_undo_rec(
/*************************************************************** /***************************************************************
Undoes a fresh insert of a row to a table. A fresh insert means that Undoes a fresh insert of a row to a table. A fresh insert means that
the same clustered index unique key did not have any record, even delete the same clustered index unique key did not have any record, even delete
marked, at the time of the insert. */ marked, at the time of the insert. InnoDB is eager in a rollback:
if it figures out that an index record will be removed in the purge
anyway, it will remove it in the rollback. */
UNIV_INTERN UNIV_INTERN
ulint ulint
row_undo_ins( row_undo_ins(
......
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