diff options
author | unknown <monty@donna.mysql.com> | 2000-09-16 04:27:21 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-09-16 04:27:21 +0300 |
commit | e6e3c8b6c48715dea90e939f23026965d28afb82 (patch) | |
tree | 6e20280a8abcc28d14385983250a3e1823639028 /myisammrg | |
parent | 7f27285af709c8a2b65ad6f8587940ec2e461f12 (diff) | |
download | mariadb-git-e6e3c8b6c48715dea90e939f23026965d28afb82.tar.gz |
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
Diffstat (limited to 'myisammrg')
-rw-r--r-- | myisammrg/myrg_close.c | 4 | ||||
-rw-r--r-- | myisammrg/myrg_open.c | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/myisammrg/myrg_close.c b/myisammrg/myrg_close.c index 0b9acd921ae..7ab73c5ded4 100644 --- a/myisammrg/myrg_close.c +++ b/myisammrg/myrg_close.c @@ -18,8 +18,7 @@ #include "mymrgdef.h" -int myrg_close(info) -register MYRG_INFO *info; +int myrg_close(MYRG_INFO *info) { int error=0,new_error; MYRG_TABLE *file; @@ -28,6 +27,7 @@ register MYRG_INFO *info; 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); diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c index c12fa1fa52b..7f80a88dddc 100644 --- a/myisammrg/myrg_open.c +++ b/myisammrg/myrg_open.c @@ -86,7 +86,7 @@ int handle_locking; *m_info=info; m_info->open_tables=(MYRG_TABLE *) (m_info+1); m_info->tables=files; - + for (i=files ; i-- > 0 ; ) { m_info->open_tables[i].table=isam; @@ -104,12 +104,16 @@ int handle_locking; m_info->open_tables[i].file_offset=(my_off_t) file_offset; file_offset+=m_info->open_tables[i].table->state->data_file_length; } + errpos=2; if (sizeof(my_off_t) == 4 && file_offset > (ulonglong) (ulong) ~0L) { my_errno=HA_ERR_RECORD_FILE_FULL; - my_free((char*) m_info,MYF(0)); goto err; } + /* Allocate memory for queue */ + if (m_info->open_tables->table->s->base.keys && + _myrg_init_queue(m_info,0,HA_READ_KEY_EXACT)) + goto err; m_info->end_table=m_info->open_tables+files; m_info->last_used_table=m_info->open_tables; @@ -119,12 +123,14 @@ int handle_locking; pthread_mutex_lock(&THR_LOCK_open); myrg_open_list=list_add(myrg_open_list,&m_info->open_list); pthread_mutex_unlock(&THR_LOCK_open); - m_info->by_key.root=0; DBUG_RETURN(m_info); err: save_errno=my_errno; switch (errpos) { + case 2: + my_free((char*) m_info,MYF(0)); + /* Fall through */ case 1: VOID(my_fclose(file,MYF(0))); for (i=files ; i-- > 0 ; ) |