summaryrefslogtreecommitdiff
path: root/innobase/row/row0umod.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/row/row0umod.c')
-rw-r--r--innobase/row/row0umod.c61
1 files changed, 21 insertions, 40 deletions
diff --git a/innobase/row/row0umod.c b/innobase/row/row0umod.c
index 1bfd71f8c64..3c181ed5493 100644
--- a/innobase/row/row0umod.c
+++ b/innobase/row/row0umod.c
@@ -95,14 +95,11 @@ row_undo_mod_clust_low(
ulint mode) /* in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE */
{
big_rec_t* dummy_big_rec;
- dict_index_t* index;
btr_pcur_t* pcur;
btr_cur_t* btr_cur;
ulint err;
ibool success;
- index = dict_table_get_first_index(node->table);
-
pcur = &(node->pcur);
btr_cur = btr_pcur_get_btr_cur(pcur);
@@ -317,13 +314,6 @@ row_undo_mod_del_mark_or_remove_sec_low(
if (!found) {
/* Not found */
- /* FIXME: remove printfs in the final version */
-
- /* printf(
- "--UNDO MOD: Record not found from page %lu index %s\n",
- buf_frame_get_page_no(btr_cur_get_rec(btr_cur)),
- index->name); */
-
btr_pcur_close(&pcur);
mtr_commit(&mtr);
@@ -421,49 +411,40 @@ row_undo_mod_del_unmark_sec_and_undo_update(
DB_OUT_OF_FILE_SPACE */
ulint mode, /* in: search mode: BTR_MODIFY_LEAF or
BTR_MODIFY_TREE */
- undo_node_t* node, /* in: row undo node */
que_thr_t* thr, /* in: query thread */
dict_index_t* index, /* in: index */
dtuple_t* entry) /* in: index entry */
{
mem_heap_t* heap;
btr_pcur_t pcur;
- btr_cur_t* btr_cur;
upd_t* update;
- rec_t* rec;
ulint err = DB_SUCCESS;
ibool found;
big_rec_t* dummy_big_rec;
mtr_t mtr;
- char err_buf[1000];
- UT_NOT_USED(node);
-
log_free_check();
mtr_start(&mtr);
found = row_search_index_entry(index, entry, mode, &pcur, &mtr);
if (!found) {
- fprintf(stderr,
- "InnoDB: error in sec index entry del undo in\n"
- "InnoDB: index %s table %s\n", index->name,
- index->table->name);
- dtuple_sprintf(err_buf, 900, entry);
- fprintf(stderr, "InnoDB: tuple %s\n", err_buf);
-
- rec_sprintf(err_buf, 900, btr_pcur_get_rec(&pcur));
- fprintf(stderr, "InnoDB: record %s\n", err_buf);
-
- trx_print(err_buf, thr_get_trx(thr));
- fprintf(stderr,
- "%s\nInnoDB: Make a detailed bug report and send it\n",
- err_buf);
- fprintf(stderr, "InnoDB: to mysql@lists.mysql.com\n");
+ fputs("InnoDB: error in sec index entry del undo in\n"
+ "InnoDB: ", stderr);
+ dict_index_name_print(stderr, index);
+ fputs("\n"
+ "InnoDB: tuple ", stderr);
+ dtuple_print(stderr, entry);
+ fputs("\n"
+ "InnoDB: record ", stderr);
+ rec_print(stderr, btr_pcur_get_rec(&pcur));
+ putc('\n', stderr);
+ trx_print(stderr, thr_get_trx(thr));
+ fputs("\n"
+ "InnoDB: Make a detailed bug report and send it\n"
+ "InnoDB: to mysql@lists.mysql.com\n", stderr);
} else {
- btr_cur = btr_pcur_get_btr_cur(&pcur);
-
- rec = btr_cur_get_rec(btr_cur);
+ btr_cur_t* btr_cur = btr_pcur_get_btr_cur(&pcur);
err = btr_cur_del_mark_set_sec_rec(BTR_NO_LOCKING_FLAG,
btr_cur, FALSE, thr, &mtr);
@@ -471,7 +452,7 @@ row_undo_mod_del_unmark_sec_and_undo_update(
heap = mem_heap_create(100);
update = row_upd_build_sec_rec_difference_binary(index, entry,
- rec, heap);
+ btr_cur_get_rec(btr_cur), heap);
if (upd_get_n_fields(update) == 0) {
/* Do nothing */
@@ -566,11 +547,11 @@ row_undo_mod_del_mark_sec(
err = row_undo_mod_del_unmark_sec_and_undo_update(
BTR_MODIFY_LEAF,
- node, thr, index, entry);
+ thr, index, entry);
if (err == DB_FAIL) {
err = row_undo_mod_del_unmark_sec_and_undo_update(
BTR_MODIFY_TREE,
- node, thr, index, entry);
+ thr, index, entry);
}
if (err != DB_SUCCESS) {
@@ -649,12 +630,12 @@ row_undo_mod_upd_exist_sec(
node->update, NULL);
err = row_undo_mod_del_unmark_sec_and_undo_update(
BTR_MODIFY_LEAF,
- node, thr, index, entry);
+ thr, index, entry);
if (err == DB_FAIL) {
err =
row_undo_mod_del_unmark_sec_and_undo_update(
BTR_MODIFY_TREE,
- node, thr, index, entry);
+ thr, index, entry);
}
if (err != DB_SUCCESS) {
@@ -752,7 +733,7 @@ row_undo_mod(
if (node->table == NULL) {
found = FALSE;
} else {
- found = row_undo_search_clust_to_pcur(node, thr);
+ found = row_undo_search_clust_to_pcur(node);
}
if (!found) {