diff options
author | unknown <joreland@mysql.com> | 2005-06-13 14:09:09 +0200 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2005-06-13 14:09:09 +0200 |
commit | ef798fc8b608a90d5c33a96ed6a05f994c13bc72 (patch) | |
tree | 7e3f66a702511215287651c2b4df1c301c2f0c8a /storage/myisam | |
parent | c37d14f919e616f348eb1b090cee029b4bc5c772 (diff) | |
parent | adac97e22013b6cb387ccef74e099557123a1ea1 (diff) | |
download | mariadb-git-ef798fc8b608a90d5c33a96ed6a05f994c13bc72.tar.gz |
merge
BitKeeper/etc/logging_ok:
auto-union
configure.in:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/bdb/dist/configure.ac:
Auto merged
storage/innobase/os/os0file.c:
Auto merged
storage/innobase/os/os0sync.c:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_open.c:
Auto merged
storage/ndb/src/common/logger/Logger.cpp:
Auto merged
storage/ndb/src/cw/cpcd/main.cpp:
Auto merged
storage/ndb/test/ndbapi/testBlobs.cpp:
Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
Auto merged
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/mi_check.c | 8 | ||||
-rw-r--r-- | storage/myisam/mi_open.c | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index 38f3ebaa20a..9e003a18dac 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -3871,6 +3871,14 @@ int update_state_info(MI_CHECK *param, MI_INFO *info,uint update) if (!share->state.create_time) share->state.create_time=share->state.check_time; } + /* + When tables are locked we haven't synched the share state and the + real state for a while so we better do it here before synching + the share state to disk. Only when table is write locked is it + necessary to perform this synch. + */ + if (info->lock_type == F_WRLCK) + share->state.state= *info->state; if (mi_state_info_write(share->kfile,&share->state,1+2)) goto err; share->changed=0; diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index d65a46a92fb..456b87b7799 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -526,7 +526,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) share->base.max_key_length), &info.lastkey,share->base.max_key_length*3+1, &info.first_mbr_key, share->base.max_key_length, - &info.filename,strlen(org_name)+1, + &info.filename,strlen(name)+1, &info.rtree_recursion_state,have_rtree ? 1024 : 0, NullS)) goto err; @@ -535,7 +535,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) if (!have_rtree) info.rtree_recursion_state= NULL; - strmov(info.filename,org_name); + strmov(info.filename,name); memcpy(info.blobs,share->blobs,sizeof(MI_BLOB)*share->base.blobs); info.lastkey2=info.lastkey+share->base.max_key_length; |