mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
Revert the fix of Bug#38996 Race condition in ANALYZE TABLE
This is branches/zip@r6032 in SVN and _is part_ of revid:svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6113 in BZR. This is being reverted because now the code is serialized directly on index->stat_n_diff_key_vals[] as the fix for Bug#53046 dict_update_statistics_low can still be run concurrently on same table goes.
This commit is contained in:
parent
1a4896325d
commit
7cf27d3806
1 changed files with 0 additions and 9 deletions
|
@ -108,7 +108,6 @@ static ulong commit_threads = 0;
|
|||
static pthread_mutex_t commit_threads_m;
|
||||
static pthread_cond_t commit_cond;
|
||||
static pthread_mutex_t commit_cond_m;
|
||||
static pthread_mutex_t analyze_mutex;
|
||||
static bool innodb_inited = 0;
|
||||
|
||||
#define INSIDE_HA_INNOBASE_CC
|
||||
|
@ -2237,7 +2236,6 @@ innobase_change_buffering_inited_ok:
|
|||
pthread_mutex_init(&prepare_commit_mutex, MY_MUTEX_INIT_FAST);
|
||||
pthread_mutex_init(&commit_threads_m, MY_MUTEX_INIT_FAST);
|
||||
pthread_mutex_init(&commit_cond_m, MY_MUTEX_INIT_FAST);
|
||||
pthread_mutex_init(&analyze_mutex, MY_MUTEX_INIT_FAST);
|
||||
pthread_cond_init(&commit_cond, NULL);
|
||||
innodb_inited= 1;
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
|
@ -2292,7 +2290,6 @@ innobase_end(
|
|||
pthread_mutex_destroy(&prepare_commit_mutex);
|
||||
pthread_mutex_destroy(&commit_threads_m);
|
||||
pthread_mutex_destroy(&commit_cond_m);
|
||||
pthread_mutex_destroy(&analyze_mutex);
|
||||
pthread_cond_destroy(&commit_cond);
|
||||
}
|
||||
|
||||
|
@ -7663,15 +7660,9 @@ ha_innobase::analyze(
|
|||
THD* thd, /*!< in: connection thread handle */
|
||||
HA_CHECK_OPT* check_opt) /*!< in: currently ignored */
|
||||
{
|
||||
/* Serialize ANALYZE TABLE inside InnoDB, see
|
||||
Bug#38996 Race condition in ANALYZE TABLE */
|
||||
pthread_mutex_lock(&analyze_mutex);
|
||||
|
||||
/* Simply call ::info() with all the flags */
|
||||
info(HA_STATUS_TIME | HA_STATUS_CONST | HA_STATUS_VARIABLE);
|
||||
|
||||
pthread_mutex_unlock(&analyze_mutex);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue