Commit d0fb8270 authored by Michael Widenius's avatar Michael Widenius

Fixed problem with crash in Maria _ma_setup_live_state() where history link...

Fixed problem with crash in Maria _ma_setup_live_state() where history link didn't include needed state

mysql-test/mysql-test-run.pl:
  Remove warnings in log about depricated mysqld options
storage/maria/ma_state.c:
  More DBUG_PRINT
storage/maria/trnman.c:
  Fixed wrong test if commit_trid is visible
parent d83f6470
......@@ -3325,9 +3325,11 @@ socket = $instance->{path_sock}
pid-file = $instance->{path_pid}
port = $instance->{port}
datadir = $instance->{path_datadir}
log = $instance->{path_datadir}/mysqld$server_id.log
general-log-file = $instance->{path_datadir}/mysqld$server_id.log
general-log = 1
log-error = $instance->{path_datadir}/mysqld$server_id.err.log
log-slow-queries = $instance->{path_datadir}/mysqld$server_id.slow.log
slow-query-log-file = $instance->{path_datadir}/mysqld$server_id.slow.log
slow-query-log = 1
language = $path_language
character-sets-dir = $path_charsetsdir
basedir = $path_my_basedir
......@@ -4004,9 +4006,11 @@ sub mysqld_arguments ($$$$) {
}
my $log_base_path= "$opt_vardir/log/$mysqld->{'type'}$sidx";
mtr_add_arg($args, "%s--log=%s.log", $prefix, $log_base_path);
mtr_add_arg($args, "%s--general-log-file=%s.log --general-log",
$prefix, $log_base_path);
mtr_add_arg($args,
"%s--log-slow-queries=%s-slow.log", $prefix, $log_base_path);
"%s--slow-query-log-file=%s-slow.log --slow-query-log",
$prefix, $log_base_path);
# Check if "extra_opt" contains --skip-log-bin
my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt, @opt_extra_mysqld_opt);
......
......@@ -155,6 +155,8 @@ MARIA_STATE_HISTORY
if (!trnman_exists_active_transactions(history->trid, last_trid,
trnman_is_locked))
{
DBUG_PRINT("info", ("removing history->trid: %lu next: %lu",
(ulong) history->trid, (ulong) last_trid));
my_free(history, MYF(0));
continue;
}
......@@ -423,6 +425,8 @@ my_bool _ma_trnman_end_trans_hook(TRN *trn, my_bool commit,
{
/* Previous history can't be seen by anyone, reuse old memory */
history= share->state_history;
DBUG_PRINT("info", ("removing history->trid: %lu new: %lu",
(ulong) history->trid, (ulong) trn->commit_trid));
}
history->state.records+= (tables->state_current.records -
......
......@@ -876,7 +876,12 @@ my_bool trnman_exists_active_transactions(TrID min_id, TrID max_id,
pthread_mutex_lock(&LOCK_trn_list);
for (trn= active_list_min.next; trn != &active_list_max; trn= trn->next)
{
if (trn->trid > min_id && trn->trid < max_id)
/*
We use >= for min_id as min_id is a commit_trid and trn->trid
is transaction id. In the case they are the same, then the
trn started after the min_id was committed.
*/
if (trn->trid >= min_id && trn->trid < max_id)
{
ret= 1;
break;
......
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