Loading include/my_global.h +3 −0 Original line number Diff line number Diff line Loading @@ -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 */ Loading myisam/mi_create.c +7 −7 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -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; Loading Loading @@ -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; Loading @@ -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, Loading @@ -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; } Loading myisammrg/myrg_create.c +1 −1 Original line number Diff line number Diff line Loading @@ -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) Loading mysql-test/r/lock.result +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ check table t2; Table Op Msg_type Msg_text test.t2 check error Table 't2' was not locked with LOCK TABLES insert into t1 select index1,nr from t1; ERROR 42000: INSERT command denied to user 'root'@'localhost' for column 'index1' in table 't1' ERROR HY000: Table 't1' was not locked with LOCK TABLES unlock tables; lock tables t1 write, t1 as t1_alias read; insert into t1 select index1,nr from t1 as t1_alias; Loading mysql-test/r/mysqldump.result +1 −0 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1, `"t"1`, t1aa,t2aa; drop database if exists mysqldump_test_db; drop view if exists v1; CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); <?xml version="1.0"?> Loading Loading
include/my_global.h +3 −0 Original line number Diff line number Diff line Loading @@ -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 */ Loading
myisam/mi_create.c +7 −7 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -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; Loading Loading @@ -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; Loading @@ -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, Loading @@ -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; } Loading
myisammrg/myrg_create.c +1 −1 Original line number Diff line number Diff line Loading @@ -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) Loading
mysql-test/r/lock.result +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ check table t2; Table Op Msg_type Msg_text test.t2 check error Table 't2' was not locked with LOCK TABLES insert into t1 select index1,nr from t1; ERROR 42000: INSERT command denied to user 'root'@'localhost' for column 'index1' in table 't1' ERROR HY000: Table 't1' was not locked with LOCK TABLES unlock tables; lock tables t1 write, t1 as t1_alias read; insert into t1 select index1,nr from t1 as t1_alias; Loading
mysql-test/r/mysqldump.result +1 −0 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1, `"t"1`, t1aa,t2aa; drop database if exists mysqldump_test_db; drop view if exists v1; CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); <?xml version="1.0"?> Loading