diff options
author | unknown <vtkachenko@quadxeon.mysql.com> | 2005-12-01 13:34:48 +0100 |
---|---|---|
committer | unknown <vtkachenko@quadxeon.mysql.com> | 2005-12-01 13:34:48 +0100 |
commit | 000ae475aabf21052696b0a68cc2489d523385a6 (patch) | |
tree | e6ef274482adb5428e869008911f300bfa799ee9 /storage/myisam/mi_locking.c | |
parent | d8647be1d9f40bc9557d10dbc2b7f6fa9eef1f11 (diff) | |
download | mariadb-git-000ae475aabf21052696b0a68cc2489d523385a6.tar.gz |
Many files:
Added mmap support for MyISAM engine
configure.in:
Added mmap support for MyISAM engine
include/my_base.h:
Added mmap support for MyISAM engine
include/my_sys.h:
Added mmap support for MyISAM engine
sql/ha_myisam.cc:
Added mmap support for MyISAM engine
sql/mysql_priv.h:
Added mmap support for MyISAM engine
sql/mysqld.cc:
Added mmap support for MyISAM engine
sql/records.cc:
Added mmap support for MyISAM engine
sql/set_var.cc:
Added mmap support for MyISAM engine
storage/myisam/mi_close.c:
Added mmap support for MyISAM engine
storage/myisam/mi_delete_all.c:
Added mmap support for MyISAM engine
storage/myisam/mi_dynrec.c:
Added mmap support for MyISAM engine
storage/myisam/mi_extra.c:
Added mmap support for MyISAM engine
storage/myisam/mi_locking.c:
Added mmap support for MyISAM engine
storage/myisam/mi_open.c:
Added mmap support for MyISAM engine
storage/myisam/mi_packrec.c:
Added mmap support for MyISAM engine
storage/myisam/mi_statrec.c:
Added mmap support for MyISAM engine
storage/myisam/myisamdef.h:
Added mmap support for MyISAM engine
Diffstat (limited to 'storage/myisam/mi_locking.c')
-rw-r--r-- | storage/myisam/mi_locking.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/storage/myisam/mi_locking.c b/storage/myisam/mi_locking.c index 8d48c5242e5..5d871aa1e38 100644 --- a/storage/myisam/mi_locking.c +++ b/storage/myisam/mi_locking.c @@ -38,7 +38,6 @@ int mi_lock_database(MI_INFO *info, int lock_type) share->w_locks, share->global_changed, share->state.open_count, share->index_file_name)); - if (share->options & HA_OPTION_READ_ONLY_DATA || info->lock_type == lock_type) DBUG_RETURN(0); @@ -84,6 +83,14 @@ int mi_lock_database(MI_INFO *info, int lock_type) (uint) share->changed, share->w_locks)); if (share->changed && !share->w_locks) { + if (info->s->mmaped_length != info->s->state.state.data_file_length) + { + if (info->s->concurrent_insert) + rw_wrlock(&info->s->mmap_lock); + mi_remap_file(info, info->s->state.state.data_file_length); + if (info->s->concurrent_insert) + rw_unlock(&info->s->mmap_lock); + } share->state.process= share->last_process=share->this_process; share->state.unique= info->last_unique= info->this_unique; share->state.update_count= info->last_loop= ++info->this_loop; @@ -215,6 +222,7 @@ int mi_lock_database(MI_INFO *info, int lock_type) } } VOID(_mi_test_if_changed(info)); + info->lock_type=lock_type; info->invalidator=info->s->invalidator; share->w_locks++; |