Below is the list of changes that have just been committed into a local
5.0 repository of serg. When serg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1824 05/03/16 23:47:38 serg@stripped +4 -0
log_event.cc:
#ifdef USING_TRANSACTIONS
ha_innodb.cc:
comment
rpl_drop_temp.test, rpl_drop_temp.result:
cleanup
sql/log_event.cc
1.168 05/03/16 23:47:16 serg@stripped +2 -0
#ifdef USING_TRANSACTIONS
sql/ha_innodb.cc
1.181 05/03/16 23:47:15 serg@stripped +20 -1
comment
mysql-test/t/rpl_drop_temp.test
1.2 05/03/16 23:47:15 serg@stripped +2 -0
cleanup
mysql-test/r/rpl_drop_temp.result
1.2 05/03/16 23:47:15 serg@stripped +1 -0
cleanup
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: serg
# Host: serg.mylan
# Root: /usr/home/serg/Abk/mysql-5.0
--- 1.167/sql/log_event.cc Wed Mar 16 10:13:29 2005
+++ 1.168/sql/log_event.cc Wed Mar 16 23:47:16 2005
@@ -2012,6 +2012,7 @@
delete rli->relay_log.description_event_for_exec;
rli->relay_log.description_event_for_exec= this;
+#ifdef USING_TRANSACTIONS
/*
As a transaction NEVER spans on 2 or more binlogs:
if we have an active transaction at this point, the master died
@@ -2033,6 +2034,7 @@
"to its binary log.");
end_trans(thd, ROLLBACK);
}
+#endif
/*
If this event comes from ourselves, there is no cleaning task to perform,
we don't call Start_log_event_v3::exec_event() (this was just to update the
--- 1.1/mysql-test/r/rpl_drop_temp.result Mon Feb 14 23:46:45 2005
+++ 1.2/mysql-test/r/rpl_drop_temp.result Wed Mar 16 23:47:15 2005
@@ -10,3 +10,4 @@
show status like 'Slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 0
+drop database mysqltest;
--- 1.1/mysql-test/t/rpl_drop_temp.test Mon Feb 14 23:46:49 2005
+++ 1.2/mysql-test/t/rpl_drop_temp.test Wed Mar 16 23:47:15 2005
@@ -11,3 +11,5 @@
connection slave;
--real_sleep 3; # time for DROP to be written
show status like 'Slave_open_temp_tables';
+drop database mysqltest;
+
--- 1.180/sql/ha_innodb.cc Wed Mar 16 17:07:05 2005
+++ 1.181/sql/ha_innodb.cc Wed Mar 16 23:47:15 2005
@@ -1483,7 +1483,7 @@
/* We were instructed to commit the whole transaction, or
this is an SQL statement end and autocommit is on */
- /* We need current binlog position for HotBackup to work.
+ /* We need current binlog position for ibbackup to work.
Note, the position is current because of prepare_commit_mutex */
trx->mysql_log_file_name = mysql_bin_log.get_log_fname();
trx->mysql_log_offset =
@@ -6472,6 +6472,25 @@
if (thd->lex->sql_command != SQLCOM_XA_PREPARE) {
+ /* For ibbackup to work the order of transactions in binlog
+ and InnoDB must be the same. Consider the situation
+
+ thread1> prepare; write to binlog; ...
+ <context switch>
+ thread2> prepare; write to binlog; commit
+ thread1> ... commit
+
+ To ensure this will not happen we're taking the mutex on
+ prepare, and releasing it on commit.
+
+ Note: only do it for normal commits, done via ha_commit_trans.
+ If 2pc protocol is executed by external transaction
+ coordinator, it will be just a regular MySQL client
+ executing XA PREPARE and XA COMMIT commands.
+ In this case we cannot know how many minutes or hours
+ will be between XA PREPARE and XA COMMIT, and we don't want
+ to block for undefined period of time.
+ */
pthread_mutex_lock(&prepare_commit_mutex);
trx->active_trans = 2;
}
| Thread |
|---|
| • bk commit into 5.0 tree (serg:1.1824) | Sergei Golubchik | 16 Mar |