diff options
author | unknown <ingo@mysql.com> | 2005-03-04 11:37:45 +0100 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2005-03-04 11:37:45 +0100 |
commit | de41399fb6ccdd9852f0d1a3359c44ded26df037 (patch) | |
tree | be5541209e5f5e84db880427fffd18b0e7e9ceb8 /myisam/mi_create.c | |
parent | 6010c88dfb3c58b91a6de52adb5f237b03d1b109 (diff) | |
parent | 19ca312b215245d3ac674ed880500466c8b58589 (diff) | |
download | mariadb-git-de41399fb6ccdd9852f0d1a3359c44ded26df037.tar.gz |
Merge with after merge fix
BitKeeper/deleted/.del-create.c~96cecc433c0c2242:
Auto merged
include/my_global.h:
Auto merged
myisam/mi_create.c:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e:
Auto merged
BitKeeper/deleted/.del-mrg_create.c~b747c8ec2b801f6:
Auto merged
sql/table.cc:
Auto merged
sql/sql_udf.cc:
After merge fix
Diffstat (limited to 'myisam/mi_create.c')
-rw-r--r-- | myisam/mi_create.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c index 3e144cfcbfb..8635d6bcf36 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -39,7 +39,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, { register uint i,j; File dfile,file; - int errpos,save_errno; + int errpos,save_errno, create_mode= O_RDWR | O_TRUNC; myf create_flag; uint fields,length,max_key_length,packed,pointer,real_length_diff, key_length,info_length,key_segs,options,min_key_length_skip, @@ -173,7 +173,10 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if (!(options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD))) min_pack_length+= varchar_length; if (flags & HA_CREATE_TMP_TABLE) + { options|= HA_OPTION_TMP_TABLE; + create_mode|= O_EXCL | O_NOFOLLOW; + } if (flags & HA_CREATE_CHECKSUM || (options & HA_OPTION_CHECKSUM)) { options|= HA_OPTION_CHECKSUM; @@ -573,9 +576,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, goto err; } - if ((file= my_create_with_symlink(linkname_ptr, - filename, - 0, O_RDWR | O_TRUNC, + if ((file= my_create_with_symlink(linkname_ptr, filename, 0, create_mode, MYF(MY_WME | create_flag))) < 0) goto err; errpos=1; @@ -586,7 +587,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if (share.base.raid_type) { (void) fn_format(filename,name,"",MI_NAME_DEXT,2+4); - if ((dfile=my_raid_create(filename,0,O_RDWR | O_TRUNC, + if ((dfile=my_raid_create(filename, 0, create_mode, share.base.raid_type, share.base.raid_chunks, share.base.raid_chunksize, @@ -610,8 +611,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, create_flag=MY_DELETE_OLD; } if ((dfile= - my_create_with_symlink(linkname_ptr, filename, - 0,O_RDWR | O_TRUNC, + my_create_with_symlink(linkname_ptr, filename, 0, create_mode, MYF(MY_WME | create_flag))) < 0) goto err; } |