summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-09-01 16:20:23 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-09-01 16:20:23 +0300
commit4d51ca63867e0d082ec25548ce9c6b4418407dd0 (patch)
treea386fe447939dc83efdb8f70f3cccb6d39e08610 /storage/myisam
parentebafe5a2367478413bd582487c9afc18ccd7f4f7 (diff)
parent94e9dc95d4bebf711f001e16bbb53fd8d6a58b8c (diff)
downloadmariadb-git-4d51ca63867e0d082ec25548ce9c6b4418407dd0.tar.gz
Merge 10.1 into 10.2
This also fixes MDEV-20464.
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/mi_create.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c
index 9f17a9b2de9..de516d9fb6a 100644
--- a/storage/myisam/mi_create.c
+++ b/storage/myisam/mi_create.c
@@ -184,7 +184,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
if (flags & HA_CREATE_TMP_TABLE)
{
options|= HA_OPTION_TMP_TABLE;
- create_mode|= O_NOFOLLOW;
+ create_mode|= O_NOFOLLOW | (internal_table ? 0 : O_EXCL);
}
if (flags & HA_CREATE_CHECKSUM || (options & HA_OPTION_CHECKSUM))
{
@@ -619,8 +619,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
{
char *iext= strrchr(name, '.');
int have_iext= iext && !strcmp(iext, MI_NAME_IEXT);
- fn_format(kfilename, name, "", MI_NAME_IEXT,
- MY_UNPACK_FILENAME | MY_RETURN_REAL_PATH |
+ fn_format(kfilename, name, "", MI_NAME_IEXT, MY_UNPACK_FILENAME |
+ (internal_table ? 0 : MY_RETURN_REAL_PATH) |
(have_iext ? MY_REPLACE_EXT : MY_APPEND_EXT));
/* Replace the current file */
create_flag=(flags & HA_CREATE_KEEP_FILES) ? 0 : MY_DELETE_OLD;