Commit 6b0fa540 authored by Sergey Petrunya's avatar Sergey Petrunya

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