summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--innobase/fil/fil0fil.c15
-rw-r--r--innobase/ibuf/ibuf0ibuf.c16
-rw-r--r--sql/ha_innodb.cc26
3 files changed, 20 insertions, 37 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);
}
/***********************************************************************
diff --git a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c
index b95f0a1832b..9c7d9c5c3da 100644
--- a/innobase/ibuf/ibuf0ibuf.c
+++ b/innobase/ibuf/ibuf0ibuf.c
@@ -3499,21 +3499,9 @@ ibuf_print(
data = UT_LIST_GET_FIRST(ibuf->data_list);
while (data) {
- fprintf(file,
- "Ibuf for space %lu: size %lu, free list len %lu, seg size %lu,",
- (ulong) data->space, (ulong) data->size,
- (ulong) data->free_list_len,
- (ulong) data->seg_size);
-
- if (data->empty) {
- fputs(" is empty\n", file);
- } else {
- fputs(" is not empty\n", file);
- }
fprintf(file,
- "Ibuf for space %lu: size %lu, free list len %lu, seg size %lu,\n"
- "%lu inserts, %lu merged recs, %lu merges\n",
- (ulong) data->space,
+ "Ibuf: size %lu, free list len %lu, seg size %lu,\n"
+ "%lu inserts, %lu merged recs, %lu merges\n",
(ulong) data->size,
(ulong) data->free_list_len,
(ulong) data->seg_size,
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 6aadce0191a..472506f9903 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -5943,14 +5943,6 @@ ha_innobase::start_stmt(
innobase_release_stat_resources(trx);
- if (trx->isolation_level <= TRX_ISO_READ_COMMITTED
- && trx->global_read_view) {
- /* At low transaction isolation levels we let
- each consistent read set its own snapshot */
-
- read_view_close_for_mysql(trx);
- }
-
prebuilt->sql_stat_start = TRUE;
prebuilt->hint_need_to_fetch_extra_cols = 0;
prebuilt->read_just_key = 0;
@@ -6684,17 +6676,17 @@ ha_innobase::store_lock(
&& !thd->tablespace_op
&& thd->lex->sql_command != SQLCOM_TRUNCATE
&& thd->lex->sql_command != SQLCOM_OPTIMIZE
+
#ifdef __WIN__
- /*
- for alter table on win32 for succesfull operation
- completion it is used TL_WRITE(=10) lock instead of
- TL_WRITE_ALLOW_READ(=6), however here in innodb handler
- TL_WRITE is lifted to TL_WRITE_ALLOW_WRITE, which causes
- race condition when several clients do alter table
- simultaneously (bug #17264). This fix avoids the problem.
- */
- && thd->lex->sql_command != SQLCOM_ALTER_TABLE
+ /* For alter table on win32 for succesful operation
+ completion it is used TL_WRITE(=10) lock instead of
+ TL_WRITE_ALLOW_READ(=6), however here in innodb handler
+ TL_WRITE is lifted to TL_WRITE_ALLOW_WRITE, which causes
+ race condition when several clients do alter table
+ simultaneously (bug #17264). This fix avoids the problem. */
+ && thd->lex->sql_command != SQLCOM_ALTER_TABLE
#endif
+
&& thd->lex->sql_command != SQLCOM_CREATE_TABLE) {
lock_type = TL_WRITE_ALLOW_WRITE;