summaryrefslogtreecommitdiff
path: root/myisam/mi_close.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2001-01-16 15:02:25 +0200
committerunknown <monty@donna.mysql.com>2001-01-16 15:02:25 +0200
commit3a959eeb02448cbc6ce70d5e1752baed88c96bb2 (patch)
treef2d56706f932b8495846a884f7a9aa8bbbab0e3f /myisam/mi_close.c
parent06bd49890236ca125ebbd2bd66caa6f59fa49417 (diff)
downloadmariadb-git-3a959eeb02448cbc6ce70d5e1752baed88c96bb2.tar.gz
Fixed bug in CHECK TABLE ... EXTENDED
Added keyword MEDIUM to CHECK TABLE New benchmarks results for Linux-alpha BitKeeper/deleted/.del-READ-ME~ed6c5184d4bf6b7c: Delete: strings/READ-ME BitKeeper/deleted/.del-ATIS-mysql-Linux_2.2.13_SMP_alpha~21ddf9425cbdd58: Delete: sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha BitKeeper/deleted/.del-RUN-mysql-Linux_2.2.13_SMP_alpha~583091e05a25fb6: Delete: sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha BitKeeper/deleted/.del-alter-table-mysql-Linux_2.2.13_SMP_alpha~6c20c9ef46f82241: Delete: sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha BitKeeper/deleted/.del-big-tables-mysql-Linux_2.2.13_SMP_alpha~e8cc899bb933532f: Delete: sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha BitKeeper/deleted/.del-connect-mysql-Linux_2.2.13_SMP_alpha~84df7c6446e51e26: Delete: sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha BitKeeper/deleted/.del-create-mysql-Linux_2.2.13_SMP_alpha~2c9af91e9771f618: Delete: sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha BitKeeper/deleted/.del-insert-mysql-Linux_2.2.13_SMP_alpha~688809eb8ea77b3d: Delete: sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha BitKeeper/deleted/.del-select-mysql-Linux_2.2.13_SMP_alpha~db59425a7f4aa93f: Delete: sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.2.13_SMP_alpha~fc410754151d622c: Delete: sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha Docs/manual.texi: Updated ChangeLog myisam/mi_close.c: Force write of crashed flag on close myisam/mi_info.c: Fixed that mean_reclength works for big files mysql-test/r/show_check.result: Added test of CHECK TABLE ... MEDIUM mysql-test/t/show_check.test: Added test of CHECK TABLE ... MEDIUM sql/ha_myisam.cc: Fixed that CHECK TABLE .. EXTENDED works properly Cleared the CRASHED flag on repair sql/lex.h: Added keyword MEDIUM sql/sql_yacc.yy: Added CHECK TABLE .. MEDIUM
Diffstat (limited to 'myisam/mi_close.c')
-rw-r--r--myisam/mi_close.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/myisam/mi_close.c b/myisam/mi_close.c
index 059e7d3223a..f30119144bc 100644
--- a/myisam/mi_close.c
+++ b/myisam/mi_close.c
@@ -65,8 +65,13 @@ int mi_close(register MI_INFO *info)
share->temporary ? FLUSH_IGNORE_CHANGED :
FLUSH_RELEASE))
error=my_errno;
- if (share->kfile >= 0 && my_close(share->kfile,MYF(0)))
- error = my_errno;
+ if (share->kfile >= 0)
+ {
+ if (share->mode != O_RDONLY && mi_is_crashed(info))
+ mi_state_info_write(share->kfile, &share->state, 1);
+ if (my_close(share->kfile,MYF(0)))
+ error = my_errno;
+ }
#ifdef HAVE_MMAP
if (share->file_map)
_mi_unmap_file(info);