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
This commit is contained in:
unknown 2001-09-27 22:02:37 +03:00
commit 0edc02d653
6 changed files with 45 additions and 14 deletions

View file

@ -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);