diff options
author | unknown <serg@serg.mylan> | 2005-03-03 19:51:29 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-03 19:51:29 +0100 |
commit | 8104faa08305df5cbc848fe593444d2716ba49eb (patch) | |
tree | 6a871c4d1335ae125f6cd13af89645ec25365e37 /sql/ha_myisam.cc | |
parent | 026bb52678a2a8ca1cc2b242b5dfaa38c56261b9 (diff) | |
download | mariadb-git-8104faa08305df5cbc848fe593444d2716ba49eb.tar.gz |
Fixes for bugs reported by Stefano Di Paola (stefano.dipaola@wisec.it)
include/my_global.h:
O_NOFOLLOW
isam/create.c:
create table files with O_EXCL|O_NOFOLLOW
merge/mrg_create.c:
create table files with O_EXCL|O_NOFOLLOW
myisam/mi_create.c:
create files of temporary tables with O_EXCL|O_NOFOLLOW
myisammrg/myrg_create.c:
create table files with O_EXCL|O_NOFOLLOW
mysys/mf_tempfile.c:
create temporary files with O_EXCL|O_NOFOLLOW
sql/ha_myisam.cc:
let mi_create know if the table is TEMPORARY
sql/mysql_priv.h:
--allow_suspicious_udfs
sql/mysqld.cc:
--allow_suspicious_udfs
sql/share/english/errmsg.txt:
typo
sql/sql_udf.cc:
--allow_suspicious_udfs
don't allow xxx() udf without any of xxx_init/deinit/add/reset
check paths when loading from mysql.func
sql/table.cc:
create frm of temporary table with O_EXCL|O_NOFOLLOW
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r-- | sql/ha_myisam.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index d79ea4adda0..cf2d8e32e0a 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -1052,7 +1052,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; bool found_real_auto_increment=0; enum ha_base_keytype type; char buff[FN_REFLEN]; @@ -1224,17 +1224,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), table_arg->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); |