summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 12:08:30 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-04-06 12:08:30 +0300
commit9d94c60f2b67b6008c69d51b0b85ac539a1ce647 (patch)
treef4a3198e4326358343abf9bfe3c667a726e23495 /storage/maria
parentd6758efbe126cdc6a0718a4b560d9e8f494c0399 (diff)
parentcacb61b6be78b01a9c62890cc81d059ee46921ac (diff)
downloadmariadb-git-9d94c60f2b67b6008c69d51b0b85ac539a1ce647.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ma_loghandler.c17
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