diff --git a/sql/handler.h b/sql/handler.h index 6805876ff49..feb551670a3 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -23,7 +23,9 @@ #include #include #include +#ifdef WITH_MARIA_STORAGE_ENGINE #include "../storage/maria/ma_pagecache.h" +#endif #ifndef NO_HASH #define NO_HASH /* Not yet implemented */ @@ -859,7 +861,9 @@ typedef struct st_ha_check_opt uint flags; /* isam layer flags (e.g. for myisamchk) */ uint sql_flags; /* sql layer flags - for something myisamchk cannot do */ KEY_CACHE *key_cache; /* new key cache when changing key cache */ +#ifdef WITH_MARIA_STORAGE_ENGINE PAGECACHE *pagecache; /* new pagecache when changing pagecache */ +#endif void init(); } HA_CHECK_OPT; @@ -1818,6 +1822,7 @@ int ha_resize_key_cache(KEY_CACHE *key_cache); int ha_change_key_cache_param(KEY_CACHE *key_cache); int ha_change_key_cache(KEY_CACHE *old_key_cache, KEY_CACHE *new_key_cache); int ha_end_key_cache(KEY_CACHE *key_cache); +#ifdef WITH_MARIA_STORAGE_ENGINE /* pagecache */ int ha_init_pagecache(const char *name, PAGECACHE *pagecache); /* @@ -1827,6 +1832,7 @@ int ha_resize_pagecache(PAGECACHE *pagecache); int ha_change_pagecache_param(PAGECACHE *pagecache); int ha_change_pagecache(PAGECACHE *old_pagecache, PAGECACHE *new_pagecache); int ha_end_pagecache(PAGECACHE *pagecache); +#endif /* report to InnoDB that control passes to the client */ int ha_release_temporary_latches(THD *thd); diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index 52390de9690..6ed4a3f2757 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -5604,6 +5604,10 @@ static int write_log_record_for_repair(const HA_CHECK *param, MARIA_HA *info) /* The table's existence was made durable earlier (MY_SYNC_DIR passed to maria_change_to_newfile()). + */ + if (_ma_update_create_rename_lsn_on_disk(info->s, lsn, FALSE)) + return 1; + /* _ma_flush_table_files_after_repair() is later called by maria_repair(), and makes sure to flush the data, index, update is_of_lsn, flush state and sync, so create_rename_lsn reaches disk, thus we won't apply old