mariadb/myisammrg/myrg_close.c
unknown 19b678eefe Faster log::write() call, memory leak fix, flush master fix.
BUILD/compile-alpha-ccc:
  remove deps to get things to compile better
Docs/manual.texi:
  Small fixes
configure.in:
  Fix for mlockmem()
include/my_sys.h:
  Made key_cache_inited global
myisammrg/myrg_close.c:
  Fixed memory leak
myisammrg/myrg_open.c:
  Initialize queue to avoid memory leak bug
mysys/mf_format.c:
  Added overflow check
mysys/mf_keycache.c:
  Made key_cache_init more secure to use
mysys/my_static.h:
  Make key_cache_inite global
sql/ChangeLog:
  Changes
sql/lock.cc:
  Added logging of locktime
sql/log.cc:
  Added logging of locktime
sql/mysql_priv.h:
  Added locked_in_memory
sql/mysqld.cc:
  Added logging of locktime + locked in memory
sql/sql_acl.cc:
  Added thd to log::write() for faster call
sql/sql_base.cc:
  Use global key_cache variable
sql/sql_class.cc:
  Added result row counting
sql/sql_class.h:
  Added thd to log::write() for faster call
sql/sql_db.cc:
  Added thd to log::write() for faster call
sql/sql_delete.cc:
  Added thd to log::write() for faster call
sql/sql_insert.cc:
  Added thd to log::write() for faster call
sql/sql_load.cc:
  Added thd to log::write() for faster call
sql/sql_parse.cc:
  Added thd to log::write() for faster call
sql/sql_rename.cc:
  Added thd to log::write() for faster call
sql/sql_table.cc:
  Added thd to log::write() for faster call
sql/sql_update.cc:
  Added thd to log::write() for faster call
2000-09-16 04:27:21 +03:00

40 lines
1.3 KiB
C

/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* close a isam-database */
#include "mymrgdef.h"
int myrg_close(MYRG_INFO *info)
{
int error=0,new_error;
MYRG_TABLE *file;
DBUG_ENTER("myrg_close");
for (file=info->open_tables ; file != info->end_table ; file++)
if ((new_error=mi_close(file->table)))
error=new_error;
delete_queue(&info->by_key);
pthread_mutex_lock(&THR_LOCK_open);
myrg_open_list=list_delete(myrg_open_list,&info->open_list);
pthread_mutex_unlock(&THR_LOCK_open);
my_free((gptr) info,MYF(0));
if (error)
{
DBUG_RETURN(my_errno=error);
}
DBUG_RETURN(0);
}