Commit 7bd7643a authored by unknown's avatar unknown
Browse files

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
parents aec0408b e54b545a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -523,6 +523,9 @@ typedef SOCKET_SIZE_TYPE size_socket;
#ifndef O_SHORT_LIVED
#define O_SHORT_LIVED	0
#endif
#ifndef O_NOFOLLOW
#define O_NOFOLLOW      0
#endif

/* #define USE_RECORD_LOCK	*/

+7 −7
Original line number Diff line number Diff line
@@ -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;
    }
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ int myrg_create(const char *name, const char **table_names,

  errpos=0;
  if ((file = my_create(fn_format(buff,name,"",MYRG_NAME_EXT,4),0,
       O_RDWR | O_TRUNC,MYF(MY_WME))) < 0)
       O_RDWR | O_EXCL | O_NOFOLLOW,MYF(MY_WME))) < 0)
    goto err;
  errpos=1;
  if (table_names)
+4 −4
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
    {
      strmake(to,res,FN_REFLEN-1);
      (*free)(res);
      file=my_create(to,0, mode, MyFlags);
      file=my_create(to,0, mode | O_EXCL | O_NOFOLLOW, MyFlags);
    }
    environ=old_env;
  }
@@ -81,7 +81,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
  {
    strmake(to,res,FN_REFLEN-1);
    (*free)(res);
    file=my_create(to, 0, mode, MyFlags);
    file=my_create(to, 0, mode | O_EXCL | O_NOFOLLOW, MyFlags);
  }
#elif defined(HAVE_MKSTEMP) && !defined(__NETWARE__)
  {
@@ -143,7 +143,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
      strmake(to,res,FN_REFLEN-1);
      (*free)(res);
      file=my_create(to,0,
		     (int) (O_RDWR | O_BINARY | O_TRUNC |
		     (int) (O_RDWR | O_BINARY | O_TRUNC | O_EXCL | O_NOFOLLOW |
			    O_TEMPORARY | O_SHORT_LIVED),
		     MYF(MY_WME));

@@ -186,7 +186,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
      }
      (void) strmov(end_pos,TMP_EXT);
      file=my_create(to,0,
		     (int) (O_RDWR | O_BINARY | O_TRUNC |
		     (int) (O_RDWR | O_BINARY | O_TRUNC | O_EXCL | O_NOFOLLOW |
			    O_TEMPORARY | O_SHORT_LIVED),
		     MYF(MY_WME));
    }
+11 −7
Original line number Diff line number Diff line
@@ -1350,7 +1350,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
		      HA_CREATE_INFO *info)
{
  int error;
  uint i,j,recpos,minpos,fieldpos,temp_length,length;
  uint i,j,recpos,minpos,fieldpos,temp_length,length, create_flags= 0;
  bool found_real_auto_increment=0;
  enum ha_base_keytype type;
  char buff[FN_REFLEN];
@@ -1538,17 +1538,21 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
  create_info.data_file_name=  info->data_file_name;
  create_info.index_file_name= info->index_file_name;

  if (info->options & HA_LEX_CREATE_TMP_TABLE)
    create_flags|= HA_CREATE_TMP_TABLE;
  if (options & HA_OPTION_PACK_RECORD)
    create_flags|= HA_PACK_RECORD;
  if (options & HA_OPTION_CHECKSUM)
    create_flags|= HA_CREATE_CHECKSUM;
  if (options & HA_OPTION_DELAY_KEY_WRITE)
    create_flags|= HA_CREATE_DELAY_KEY_WRITE;

  /* TODO: Check that the following fn_format is really needed */
  error=mi_create(fn_format(buff,name,"","",2+4),
		  share->keys,keydef,
		  (uint) (recinfo_pos-recinfo), recinfo,
		  0, (MI_UNIQUEDEF*) 0,
		  &create_info,
		  (((options & HA_OPTION_PACK_RECORD) ? HA_PACK_RECORD : 0) |
		   ((options & HA_OPTION_CHECKSUM) ? HA_CREATE_CHECKSUM : 0) |
		   ((options & HA_OPTION_DELAY_KEY_WRITE) ?
		    HA_CREATE_DELAY_KEY_WRITE : 0)));

		  &create_info, create_flags);

  my_free((gptr) recinfo,MYF(0));
  DBUG_RETURN(error);
Loading