1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-5901: EITS: killing the server leaves statistical tables in "marked as crashed" state

- Part#2: call HA_EXTRA_FLUSH for the correct handler object, and call it after every change
  (ha_write_row, ha_update_row, ha_delete_row).
This commit is contained in:
Sergey Petrunya
2014-03-19 20:05:54 +04:00
parent a092a40334
commit 6b0fa54007

View File

@ -346,6 +346,8 @@ protected:
if ((err= stat_file->ha_update_row(record[1], record[0])) &&
err != HA_ERR_RECORD_IS_THE_SAME)
return TRUE;
/* Make change permanent and avoid 'table is marked as crashed' errors */
stat_file->extra(HA_EXTRA_FLUSH);
return FALSE;
}
@ -530,7 +532,7 @@ public:
if ((err= stat_file->ha_write_row(record[0])))
return TRUE;
/* Make change permanent and avoid 'table is marked as crashed' errors */
table->file->extra(HA_EXTRA_FLUSH);
stat_file->extra(HA_EXTRA_FLUSH);
}
return FALSE;
}
@ -585,6 +587,8 @@ public:
int err;
if ((err= stat_file->ha_delete_row(record[0])))
return TRUE;
/* Make change permanent and avoid 'table is marked as crashed' errors */
stat_file->extra(HA_EXTRA_FLUSH);
return FALSE;
}
};