diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-06 12:08:30 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-06 12:08:30 +0300 |
commit | 9d94c60f2b67b6008c69d51b0b85ac539a1ce647 (patch) | |
tree | f4a3198e4326358343abf9bfe3c667a726e23495 /storage/maria | |
parent | d6758efbe126cdc6a0718a4b560d9e8f494c0399 (diff) | |
parent | cacb61b6be78b01a9c62890cc81d059ee46921ac (diff) | |
download | mariadb-git-9d94c60f2b67b6008c69d51b0b85ac539a1ce647.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'storage/maria')
-rw-r--r-- | storage/maria/ma_loghandler.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index ca18e602a87..d2921ddf34a 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -8937,20 +8937,23 @@ void translog_hard_group_commit(my_bool mode) void translog_sync() { - uint32 max= get_current_logfile()->number; - uint32 min; DBUG_ENTER("ma_translog_sync"); - min= soft_sync_min; - if (!min) - min= max; + /* The following is only true if initalization of translog succeded */ + if (log_descriptor.open_files.elements != 0) + { + uint32 max= get_current_logfile()->number; + uint32 min; - translog_sync_files(min, max, sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS); + min= soft_sync_min; + if (!min) + min= max; + translog_sync_files(min, max, sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS); + } DBUG_VOID_RETURN; } - /** @brief set rate for group commit |