Commit cf9b8d33 authored by unknown's avatar unknown

Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria

into  gbichot4.local:/home/mysql_src/mysql-maria-no-flush-state

parents 48189ca4 0b2ba820
......@@ -2347,8 +2347,8 @@ static my_bool write_block_record(MARIA_HA *info,
in the first/second case, Recovery, when it sees the CLR_END in the
REDO phase, may decrement/increment the records' count.
*/
/** @todo when Monty has UNDO_UPDATE coded, revisit this */
log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE]= LOGREC_UNDO_ROW_DELETE;
log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE]= old_record ?
LOGREC_UNDO_ROW_UPDATE : LOGREC_UNDO_ROW_DELETE;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= (char*) log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
......
......@@ -6434,6 +6434,8 @@ static my_bool write_hook_for_clr_end(enum translog_record_type type
case LOGREC_UNDO_ROW_INSERT:
tbl_info->s->state.state.records--;
break;
case LOGREC_UNDO_ROW_UPDATE:
break;
default:
DBUG_ASSERT(0);
}
......
......@@ -979,6 +979,8 @@ prototype_redo_exec_hook(CLR_END)
case LOGREC_UNDO_ROW_INSERT:
info->s->state.state.records--;
break;
case LOGREC_UNDO_ROW_UPDATE:
break;
default:
DBUG_ASSERT(0);
}
......
......@@ -248,7 +248,7 @@ static int run_test(const char *filename)
if (testflag == 2)
{
printf("terminating after inserts\n");
printf("Terminating after inserts\n");
goto end;
}
......@@ -309,7 +309,7 @@ static int run_test(const char *filename)
if (testflag == 3)
{
printf("Terminating after update\n");
printf("Terminating after updates\n");
goto end;
}
if (!silent)
......@@ -372,7 +372,7 @@ static int run_test(const char *filename)
if (testflag == 4)
{
printf("terminating after deletes\n");
printf("Terminating after deletes\n");
goto end;
}
......
......@@ -131,7 +131,7 @@ do
for test_undo in 1 2 3
do
# first iteration tests rollback of insert, second tests rollback of delete
set -- "ma_test1 $silent -M -T -c -N $blobs" "--testflag=1" "--testflag=2" "ma_test1 $silent -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace $blobs" "--testflag=3" "--testflag=4"
set -- "ma_test1 $silent -M -T -c -N $blobs" "--testflag=1" "--testflag=2" "ma_test1 $silent -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace $blobs" "--testflag=3" "--testflag=4" "ma_test1 $silent -M -T -c -N --debug=d:t:i:o,/tmp/ma_test1.trace $blobs" "--testflag=2" "--testflag=3"
# -N (create NULL fields) is needed because --test-undo adds it anyway
while [ $# != 0 ]
do
......
This diff is collapsed.
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