Commit c4375068 authored by Michael Widenius's avatar Michael Widenius

Ensure that we mark all processed tables as 'properly closed'.

This is needed as last log entry may be a DDL that is not processed and then a table may be left in 'not properly closed state' even if information is correct in it.
parent e4e85cd2
...@@ -665,11 +665,13 @@ prototype_redo_exec_hook_dummy(INCOMPLETE_GROUP) ...@@ -665,11 +665,13 @@ prototype_redo_exec_hook_dummy(INCOMPLETE_GROUP)
prototype_redo_exec_hook(INCOMPLETE_LOG) prototype_redo_exec_hook(INCOMPLETE_LOG)
{ {
MARIA_HA *info; MARIA_HA *info;
if (skip_DDLs) if (skip_DDLs)
{ {
tprint(tracef, "we skip DDLs\n"); tprint(tracef, "we skip DDLs\n");
return 0; return 0;
} }
if ((info= get_MARIA_HA_from_REDO_record(rec)) == NULL) if ((info= get_MARIA_HA_from_REDO_record(rec)) == NULL)
{ {
/* no such table, don't need to warn */ /* no such table, don't need to warn */
...@@ -1479,7 +1481,13 @@ end: ...@@ -1479,7 +1481,13 @@ end:
if (error) if (error)
{ {
if (info != NULL) if (info != NULL)
{
/* let maria_close() mark the table properly closed */
info->s->state.open_count= 1;
info->s->global_changed= 1;
info->s->changed= 1;
maria_close(info); maria_close(info);
}
if (error == -1) if (error == -1)
error= 0; error= 0;
} }
......
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