summaryrefslogtreecommitdiff
path: root/myisam/mi_locking.c
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-10-07 12:51:32 +0300
committermonty@mysql.com <>2004-10-07 12:51:32 +0300
commit1dd4bd5f6cd2f7bbbc3f01ae0758173b889f3024 (patch)
treec40a3078a450f8748d8f07f48bdbf35e59d7f9a0 /myisam/mi_locking.c
parent01232b2c521e7715502197421f56f7294ed5a4ef (diff)
parent9954abef020742904080c9e69e4789a362ac04f5 (diff)
downloadmariadb-git-1dd4bd5f6cd2f7bbbc3f01ae0758173b889f3024.tar.gz
Merge mysql.com:/home/my/mysql-4.0 into mysql.com:/home/my/mysql-4.1
Diffstat (limited to 'myisam/mi_locking.c')
-rw-r--r--myisam/mi_locking.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c
index 2487f68d170..66950f62321 100644
--- a/myisam/mi_locking.c
+++ b/myisam/mi_locking.c
@@ -21,19 +21,6 @@
isamdatabase.
*/
-/*
- state.open_count in the .MYI file is used the following way:
- - For the first change of the file in this process it's incremented with
- mi_mark_file_change(). (We have a write lock on the file in this case)
- - In mi_close() it's decremented by _mi_decrement_open_count() if it
- was incremented in the same process.
-
- This mean that if we are the only process using the file, the open_count
- tells us if the MYISAM file wasn't properly closed. (This is true if
- my_disable_locking is set).
-*/
-
-
#include "myisamdef.h"
/* lock table by F_UNLCK, F_RDLCK or F_WRLCK */
@@ -439,7 +426,24 @@ int _mi_test_if_changed(register MI_INFO *info)
} /* _mi_test_if_changed */
-/* Put a mark in the .MYI file that someone is updating the table */
+/*
+ Put a mark in the .MYI file that someone is updating the table
+
+
+ DOCUMENTATION
+
+ state.open_count in the .MYI file is used the following way:
+ - For the first change of the .MYI file in this process open_count is
+ incremented by mi_mark_file_change(). (We have a write lock on the file
+ when this happens)
+ - In mi_close() it's decremented by _mi_decrement_open_count() if it
+ was incremented in the same process.
+
+ This mean that if we are the only process using the file, the open_count
+ tells us if the MYISAM file wasn't properly closed. (This is true if
+ my_disable_locking is set).
+*/
+
int _mi_mark_file_changed(MI_INFO *info)
{