summaryrefslogtreecommitdiff
path: root/myisam/mi_locking.c
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-10-07 12:51:32 +0300
committerunknown <monty@mysql.com>2004-10-07 12:51:32 +0300
commit9232c91d392c8dfe9ce4c6809b68c7eb23f93df8 (patch)
treec40a3078a450f8748d8f07f48bdbf35e59d7f9a0 /myisam/mi_locking.c
parent5b3444d2faf45786e5f6078e442e0514c8b2814e (diff)
parent1601646a8846c5246d803411fc349237bfdd998b (diff)
downloadmariadb-git-9232c91d392c8dfe9ce4c6809b68c7eb23f93df8.tar.gz
Merge mysql.com:/home/my/mysql-4.0 into mysql.com:/home/my/mysql-4.1
client/mysqlimport.c: Auto merged myisam/mi_locking.c: Auto merged sql/mysql_priv.h: Auto merged sql/sql_handler.cc: Auto merged
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)
{