Commit 71834ccb authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-24671 fixup: Remove srv_max_n_threads

The variable srv_max_n_threads lost its usefulness in
commit db006a9a (MDEV-21452)
and commit e71e6133 (MDEV-24671).
parent 2c5f3bbe
......@@ -1893,8 +1893,6 @@ copy_back()
return(false);
}
srv_max_n_threads = 1000;
/* copy undo tablespaces */
Copy_back_dst_dir dst_dir_buf;
......@@ -2172,8 +2170,6 @@ decrypt_decompress()
bool ret;
datadir_iter_t *it = NULL;
srv_max_n_threads = 1000;
/* cd to backup directory */
if (my_setwd(xtrabackup_target_dir, MYF(MY_WME)))
{
......
......@@ -4714,22 +4714,6 @@ static bool xtrabackup_backup_func()
return(false);
}
if (srv_buf_pool_size >= 1000 * 1024 * 1024) {
/* Here we still have srv_pool_size counted
in kilobytes (in 4.0 this was in bytes)
srv_boot() converts the value to
pages; if buffer pool is less than 1000 MB,
assume fewer threads. */
srv_max_n_threads = 50000;
} else if (srv_buf_pool_size >= 8 * 1024 * 1024) {
srv_max_n_threads = 10000;
} else {
srv_max_n_threads = 1000; /* saves several MB of memory,
especially in 64-bit
computers */
}
srv_thread_pool_init();
/* Reset the system variables in the recovery module. */
trx_pool_init();
......@@ -6166,7 +6150,6 @@ static bool xtrabackup_prepare_func(char** argv)
return(false);
}
srv_max_n_threads = 1000;
srv_n_purge_threads = 1;
xb_filters_init();
......
......@@ -174,10 +174,6 @@ struct srv_stats_t
ulint_ctr_n_t n_temp_blocks_decrypted;
};
/** We are prepared for a situation that we have this many threads waiting for
a transactional lock inside InnoDB. srv_start() sets the value. */
extern ulint srv_max_n_threads;
extern const char* srv_main_thread_op_info;
/** Prefix used by MySQL to indicate pre-5.1 table name encoding */
......
......@@ -92,10 +92,6 @@ Created 2/16/1996 Heikki Tuuri
#include "ut0crc32.h"
#include "log.h"
/** We are prepared for a situation that we have this many threads waiting for
a transactional lock inside InnoDB. srv_start() sets the value. */
ulint srv_max_n_threads;
/** Log sequence number at shutdown */
lsn_t srv_shutdown_lsn;
......@@ -1127,12 +1123,6 @@ dberr_t srv_start(bool create_new_db)
mysql_stage_register("innodb", srv_stages,
static_cast<int>(UT_ARR_SIZE(srv_stages)));
srv_max_n_threads =
1 /* dict_stats_thread */
+ 1 /* fts_optimize_thread */
+ 128 /* safety margin */
+ max_connections;
srv_boot();
ib::info() << my_crc32c_implementation();
......
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