mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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:
@ -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:
|
|||||||
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:
|
|||||||
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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user