#At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-maria/
2705 Michael Widenius 2008-12-08
Fixed problem with crash in Maria _ma_setup_live_state() where history link didn't include needed state
modified:
mysql-test/mysql-test-run.pl
storage/maria/ma_state.c
storage/maria/trnman.c
per-file messages:
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
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2008-11-21 14:21:50 +0000
+++ b/mysql-test/mysql-test-run.pl 2008-12-08 18:31:16 +0000
@@ -3325,9 +3325,11 @@ socket = $instance->{path_s
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);
=== modified file 'storage/maria/ma_state.c'
--- a/storage/maria/ma_state.c 2008-12-02 22:02:52 +0000
+++ b/storage/maria/ma_state.c 2008-12-08 18:31:16 +0000
@@ -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 *t
{
/* 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 -
=== modified file 'storage/maria/trnman.c'
--- a/storage/maria/trnman.c 2008-11-20 14:11:00 +0000
+++ b/storage/maria/trnman.c 2008-12-08 18:31:16 +0000
@@ -876,7 +876,12 @@ my_bool trnman_exists_active_transaction
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;
| Thread |
|---|
| • bzr commit into MySQL/Maria:mysql-maria branch (monty:2705) | Michael Widenius | 8 Dec |