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
parent d8d17559
......@@ -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);
}
/***********************************************************************
......
......@@ -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,
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment