diff options
author | unknown <monty@donna.mysql.com> | 2001-01-21 16:30:16 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2001-01-21 16:30:16 +0200 |
commit | ab7afc8c36279051e25d157993281bd9dba4a58a (patch) | |
tree | c772f489364087df96cf8f0582915a11ba82ae54 /merge | |
parent | 9223381f9c85297d7548f99e7ea7cd6c157e763a (diff) | |
download | mariadb-git-ab7afc8c36279051e25d157993281bd9dba4a58a.tar.gz |
Changes for --with-server-suffix
Fixed mutex bug in logging (crash on windows when doing SET PASSWORD=)
Changed MERGE tables to not use FILE
BitKeeper/deleted/.del-m.MRG~3f5632c37af00f18:
Delete: mysql-test/std_data/m.MRG
BitKeeper/deleted/.del-m.frm~e351dfe0b6824c0c:
Delete: mysql-test/std_data/m.frm
Docs/manual.texi:
Added DNS section
configure.in:
Update to 3.23.32
include/Makefile.am:
Added my_config.h
include/mysql_com.h:
Changes for --with-server-suffix
include/mysql_version.h.in:
cleanup
merge/open.c:
Don't use FILE
mysql-test/Makefile.am:
removed not needed data files
mysql-test/r/merge.result:
generate merge file
mysql-test/t/merge.test:
generate merge file
sql-bench/Results/ATIS-mysql-NT_4.0:
New benchmark results
sql-bench/Results/RUN-mysql-NT_4.0:
New benchmark results
sql-bench/Results/alter-table-mysql-NT_4.0:
New benchmark results
sql-bench/Results/big-tables-mysql-NT_4.0:
New benchmark results
sql-bench/Results/connect-mysql-NT_4.0:
New benchmark results
sql-bench/Results/create-mysql-NT_4.0:
New benchmark results
sql-bench/Results/insert-mysql-NT_4.0:
New benchmark results
sql-bench/Results/select-mysql-NT_4.0:
New benchmark results
sql-bench/Results/wisconsin-mysql-NT_4.0:
New benchmark results
sql/log.cc:
Ensure that mutex are initialized before used
sql/log_event.h:
Changes for --with-server-suffix
sql/mysql_priv.h:
Changes for --with-server-suffix
sql/mysqlbinlog.cc:
Changes for --with-server-suffix
sql/mysqld.cc:
changed strnmov -> strmake
sql/net_pkg.cc:
Prepare for adding char-set conversion to SHOW commands
Diffstat (limited to 'merge')
-rw-r--r-- | merge/open.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/merge/open.c b/merge/open.c index 18d3b53fa84..2a3d815cd27 100644 --- a/merge/open.c +++ b/merge/open.c @@ -36,11 +36,12 @@ int mode; int handle_locking; { int save_errno,i,errpos; - uint files,dir_length; + uint files,dir_length,length; ulonglong file_offset; char name_buff[FN_REFLEN*2],buff[FN_REFLEN],*end; MRG_INFO info,*m_info; - FILE *file; + File fd; + IO_CACHE file; N_INFO *isam,*last_isam; DBUG_ENTER("mrg_open"); @@ -48,15 +49,18 @@ int handle_locking; isam=0; errpos=files=0; bzero((gptr) &info,sizeof(info)); - if (!(file=my_fopen(fn_format(name_buff,name,"",MRG_NAME_EXT,4), - O_RDONLY | O_SHARE,MYF(0)))) + bzero((char*) &file,sizeof(file)); + if ((fd=my_open(fn_format(name_buff,name,"",MRG_NAME_EXT,4), + O_RDONLY | O_SHARE,MYF(0))) < 0 || + init_io_cache(&file, fd, IO_SIZE, READ_CACHE, 0, 0, + MYF(MY_WME | MY_NABP))) goto err; errpos=1; dir_length=dirname_part(name_buff,name); info.reclength=0; - while (fgets(buff,FN_REFLEN-1,file)) + while ((length=my_b_gets(&file,buff,FN_REFLEN-1))) { - if ((end=strend(buff))[-1] == '\n') + if ((end=buff+length)[-1] == '\n') end[-1]='\0'; if (buff[0]) /* Skipp empty lines */ { @@ -113,7 +117,8 @@ int handle_locking; m_info->end_table=m_info->open_tables+files; m_info->last_used_table=m_info->open_tables; - VOID(my_fclose(file,MYF(0))); + VOID(my_close(fd,MYF(0))); + end_io_cache(&file); m_info->open_list.data=(void*) m_info; pthread_mutex_lock(&THR_LOCK_open); mrg_open_list=list_add(mrg_open_list,&m_info->open_list); @@ -124,7 +129,8 @@ err: save_errno=my_errno; switch (errpos) { case 1: - VOID(my_fclose(file,MYF(0))); + VOID(my_close(fd,MYF(0))); + end_io_cache(&file); for (i=files ; i-- > 0 ; ) { isam=last_isam; |