summaryrefslogtreecommitdiff
path: root/innobase/fil
diff options
context:
space:
mode:
authortsmith@maint1.mysql.com <>2006-08-01 21:59:58 +0200
committertsmith@maint1.mysql.com <>2006-08-01 21:59:58 +0200
commit951eb48a6207669b3f1946ffebf3ea91fe5f8cf4 (patch)
tree195dc86dc4ffee1c3ceca3e742282a2bf9633a2b /innobase/fil
parentd8d17559eee16aa2f40159711f1b7967b79c5b6a (diff)
downloadmariadb-git-951eb48a6207669b3f1946ffebf3ea91fe5f8cf4.tar.gz
Applied innodb-5.0-ss677 snapshot.
Fixes: - bug #19834: Using cursors when running in READ-COMMITTED can cause InnoDB to crash - bug #21112: InnoDB slow with > 100,000 .ibd files - bug #21113: Duplicate printout in SHOW INNODB STATUS
Diffstat (limited to 'innobase/fil')
-rw-r--r--innobase/fil/fil0fil.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c
index cfd9813101d..2272f7cd8b3 100644
--- a/innobase/fil/fil0fil.c
+++ b/innobase/fil/fil0fil.c
@@ -251,9 +251,6 @@ struct fil_system_struct {
initialized. */
fil_system_t* fil_system = NULL;
-/* The tablespace memory cache hash table size */
-#define FIL_SYSTEM_HASH_SIZE 50 /* TODO: make bigger! */
-
/************************************************************************
NOTE: you must call fil_mutex_enter_and_prepare_for_io() first!
@@ -1324,11 +1321,17 @@ fil_init(
/*=====*/
ulint max_n_open) /* in: max number of open files */
{
+ ulint hash_size;
+
ut_a(fil_system == NULL);
- /*printf("Initializing the tablespace cache with max %lu open files\n",
- max_n_open); */
- fil_system = fil_system_create(FIL_SYSTEM_HASH_SIZE, max_n_open);
+ if (srv_file_per_table) {
+ hash_size = 50000;
+ } else {
+ hash_size = 5000;
+ }
+
+ fil_system = fil_system_create(hash_size, max_n_open);
}
/***********************************************************************