diff options
Diffstat (limited to 'storage/maria/ha_maria.cc')
-rw-r--r-- | storage/maria/ha_maria.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index e13302d9750..2c8a67998dd 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -4208,6 +4208,26 @@ int ha_maria::find_unique_row(uchar *record, uint constrain_no) return rc; } + +/** + Check if a table needs to be repaired +*/ + +int ha_maria::check_for_upgrade(HA_CHECK_OPT *check) +{ + if (table->s->mysql_version && table->s->mysql_version <= 100509 && + (file->s->base.extra_options & MA_EXTRA_OPTIONS_ENCRYPTED)) + { + /* + Encrypted tables before 10.5.9 had a bug where LSN was not + stored on the pages. These must be repaired! + */ + return HA_ADMIN_NEEDS_ALTER; + } + return HA_ADMIN_OK; +} + + struct st_mysql_storage_engine maria_storage_engine= { MYSQL_HANDLERTON_INTERFACE_VERSION }; |