diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-03-19 20:05:54 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-03-19 20:05:54 +0400 |
commit | 6b0fa54007307bf28f03b832a1512681455808fe (patch) | |
tree | 86f8604dc1e053d2949ddc561fe8f7113b8d8fe1 /sql/sql_statistics.cc | |
parent | a092a40334593d40bc453889d10b45eceb86eb42 (diff) | |
download | mariadb-git-6b0fa54007307bf28f03b832a1512681455808fe.tar.gz |
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).
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r-- | sql/sql_statistics.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 2d73199d2c0..bbe35ea75f0 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -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; } }; |