summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-08-20 17:32:00 +0300
committerMonty <monty@mariadb.org>2020-08-20 19:34:11 +0300
commitb1ba3a199cf00b9e4e39d73710a89a80964b7eef (patch)
tree1074d9e6f1ecb4d403390651175559d44a696551
parent2c9be1e6ee2c611fde9b3ec4014997682c7295df (diff)
downloadmariadb-git-b1ba3a199cf00b9e4e39d73710a89a80964b7eef.tar.gz
Reduce number of syncs to create a transactional aria table from 6 to 3
This was possible because we can create any missing aria files from the aria transactional log The 3 remaining syncs are: - .frm file - Directory where frm file is - Aria log file
-rw-r--r--storage/maria/ma_create.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c
index 510edce5853..25c44f7c90e 100644
--- a/storage/maria/ma_create.c
+++ b/storage/maria/ma_create.c
@@ -1173,7 +1173,14 @@ int maria_create(const char *name, enum data_file_type datafile_type,
FALSE, TRUE))
goto err;
my_free(log_data);
+
+ /*
+ We don't need to sync directory as we can use the log to recreate
+ the index and data files if needed.
+ */
+ sync_dir= 0;
}
+ DBUG_ASSERT(!internal_table || sync_dir == 0);
if (!(flags & HA_DONT_TOUCH_DATA))
{
@@ -1211,7 +1218,7 @@ int maria_create(const char *name, enum data_file_type datafile_type,
if ((dfile=
mysql_file_create_with_symlink(key_file_dfile, dlinkname_ptr,
dfilename, 0, create_mode,
- MYF(MY_WME | create_flag | sync_dir))) < 0)
+ MYF(MY_WME | create_flag))) < 0)
goto err;
errpos=3;