summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_create.c
diff options
context:
space:
mode:
authoristruewing@chilla.local <>2007-03-16 16:44:21 +0100
committeristruewing@chilla.local <>2007-03-16 16:44:21 +0100
commit02d318e4bd4af143a96226e2761a9c40a434be8b (patch)
tree1919975f7573bde129f32399ed870f091a372908 /storage/myisam/mi_create.c
parentdba23b56e59ea35b7a50e6e6574266fd15cd8f18 (diff)
parentef885b8e7e0c04f3d7ede7f72833c80abdf5d5fe (diff)
downloadmariadb-git-02d318e4bd4af143a96226e2761a9c40a434be8b.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into chilla.local:/home/mydev/mysql-5.1-bug26782
Diffstat (limited to 'storage/myisam/mi_create.c')
-rw-r--r--storage/myisam/mi_create.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c
index 5dd4a98127e..5ce07c5ac4e 100644
--- a/storage/myisam/mi_create.c
+++ b/storage/myisam/mi_create.c
@@ -603,10 +603,12 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
}
else
{
+ char *iext= strrchr(name, '.');
+ int have_iext= iext && !strcmp(iext, MI_NAME_IEXT);
fn_format(filename, name, "", MI_NAME_IEXT,
- (MY_UNPACK_FILENAME |
- (flags & HA_DONT_TOUCH_DATA) ? MY_RETURN_REAL_PATH : 0) |
- MY_APPEND_EXT);
+ MY_UNPACK_FILENAME |
+ ((flags & HA_DONT_TOUCH_DATA) ? MY_RETURN_REAL_PATH : 0) |
+ (have_iext ? MY_REPLACE_EXT : MY_APPEND_EXT));
linkname_ptr=0;
/* Replace the current file */
create_flag=MY_DELETE_OLD;