summaryrefslogtreecommitdiff
path: root/mysys/my_open.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-09-27 22:02:37 +0300
committerunknown <monty@hundin.mysql.fi>2001-09-27 22:02:37 +0300
commit0edc02d65348fb3fb1c2d814d8ff5eececdec7cf (patch)
treeefc338d3f173438bf497cfc5ec22271876b39af5 /mysys/my_open.c
parente47b763f869180053a9cd22a8688bfa04bdb6f3a (diff)
downloadmariadb-git-0edc02d65348fb3fb1c2d814d8ff5eececdec7cf.tar.gz
Fixed bug in counting open files when using many files
Fixed bug in JOIN Docs/manual.texi: Changlog mysql-test/r/join.result: New test for join bug mysql-test/r/null_key.result: Fix result after fixing join bug mysql-test/t/join.test: New test for join bug mysys/my_open.c: Fixed bug in counting open files when using many files. sql/sql_select.cc: Fixed join bug
Diffstat (limited to 'mysys/my_open.c')
-rw-r--r--mysys/my_open.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mysys/my_open.c b/mysys/my_open.c
index 2ed1af1eca1..748113528a1 100644
--- a/mysys/my_open.c
+++ b/mysys/my_open.c
@@ -75,8 +75,8 @@ int my_close(File fd, myf MyFlags)
pthread_mutex_destroy(&my_file_info[fd].mutex);
#endif
my_file_info[fd].type = UNOPEN;
- my_file_opened--;
}
+ my_file_opened--;
pthread_mutex_unlock(&THR_LOCK_open);
DBUG_RETURN(err);
} /* my_close */
@@ -96,9 +96,8 @@ File my_register_filename(File fd, const char *FileName, enum file_type
my_error(EE_OUT_OF_FILERESOURCES, MYF(ME_BELL+ME_WAITTANG),
FileName, my_errno);
return(-1);
-#else
- thread_safe_increment(my_file_opened,&THR_LOCK_open);
#endif
+ thread_safe_increment(my_file_opened,&THR_LOCK_open);
return(fd); /* safeguard */
}
pthread_mutex_lock(&THR_LOCK_open);