Below is the list of changes that have just been committed into a local
4.1 repository of sasha. When sasha 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.2457 05/11/07 15:09:35 sasha@stripped +3 -0
fix for BUG#7947 - failure to log DO RELEASE_LOCK() if we disconnect in the middle of
transaction while holding the lock. Also test to make sure other binlogging issues
reported in the bug have been addressed.
mysql-test/t/rpl_bug7947.test
1.1 05/11/07 15:01:29 sasha@stripped +22 -0
New BitKeeper file ``mysql-test/t/rpl_bug7947.test''
mysql-test/r/rpl_bug7947.result
1.1 05/11/07 15:01:29 sasha@stripped +48 -0
New BitKeeper file ``mysql-test/r/rpl_bug7947.result''
sql/item_func.cc
1.258 05/11/07 15:01:29 sasha@stripped +1 -1
fix for BUG#7947
mysql-test/t/rpl_bug7947.test
1.0 05/11/07 15:01:29 sasha@stripped +0 -0
BitKeeper file /reiser-data/mysql-dev/mysql-4.1-bug7947/mysql-test/t/rpl_bug7947.test
mysql-test/r/rpl_bug7947.result
1.0 05/11/07 15:01:29 sasha@stripped +0 -0
BitKeeper file
/reiser-data/mysql-dev/mysql-4.1-bug7947/mysql-test/r/rpl_bug7947.result
# 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: sasha
# Host: mysql.sashanet.com
# Root: /reiser-data/mysql-dev/mysql-4.1-bug7947
--- 1.257/sql/item_func.cc 2005-10-27 11:20:35 -06:00
+++ 1.258/sql/item_func.cc 2005-11-07 15:01:29 -07:00
@@ -1975,7 +1975,7 @@
tmp.copy(command, strlen(command), tmp.charset());
tmp.append(ull->key,ull->key_length);
tmp.append("\")", 2);
- Query_log_event qev(current_thd, tmp.ptr(), tmp.length(),1, FALSE);
+ Query_log_event qev(current_thd, tmp.ptr(), tmp.length(),0, FALSE);
qev.error_code=0; // this query is always safe to run on slave
mysql_bin_log.write(&qev);
}
--- New file ---
+++ mysql-test/r/rpl_bug7947.result 05/11/07 15:01:29
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
begin;
create temporary table ti (a int) engine=innodb;
rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
insert into ti values(1);
set autocommit=0;
create temporary table t1 (a int) type=myisam;
Warnings:
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
commit;
insert t1 values (1);
rollback;
create table t0 (n int);
insert t0 select * from t1;
set autocommit=1;
insert into t0 select GET_LOCK("lock1",null);
set autocommit=0;
create table t2 (n int) engine=innodb;
insert into t2 values (3);
select get_lock("lock1",null);
get_lock("lock1",null)
1
show binlog events from 79;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 79 Query 1 79 use `test`; BEGIN
master-bin.000001 119 Query 1 79 use `test`; create temporary table ti (a int)
engine=innodb
master-bin.000001 201 Query 1 201 use `test`; ROLLBACK
master-bin.000001 244 Query 1 244 use `test`; insert into ti values(1)
master-bin.000001 303 Query 1 303 use `test`; BEGIN
master-bin.000001 343 Query 1 303 use `test`; create temporary table t1 (a int)
type=myisam
master-bin.000001 423 Query 1 423 use `test`; COMMIT
master-bin.000001 464 Query 1 464 use `test`; create table t0 (n int)
master-bin.000001 522 Query 1 522 use `test`; insert t0 select * from t1
master-bin.000001 583 Query 1 583 use `test`; insert into t0 select GET_LOCK("lock1",null)
master-bin.000001 662 Query 1 662 use `test`; create table t2 (n int) engine=innodb
master-bin.000001 734 Query 1 734 use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS
`test`.`t1`,`test`.`ti`
master-bin.000001 835 Query 1 835 use `test`; DO RELEASE_LOCK("lock1")
select release_lock("lock1");
release_lock("lock1")
1
drop table t0,t2;
--- New file ---
+++ mysql-test/t/rpl_bug7947.test 05/11/07 15:01:29
--source include/master-slave.inc
connection master;
begin;
create temporary table ti (a int) engine=innodb;
rollback;
insert into ti values(1);
set autocommit=0;
create temporary table t1 (a int) type=myisam; commit;
insert t1 values (1); rollback;
create table t0 (n int);
insert t0 select * from t1;
set autocommit=1;
insert into t0 select GET_LOCK("lock1",null);
set autocommit=0;
create table t2 (n int) engine=innodb;
insert into t2 values (3);
disconnect master;
connect (master,localhost,root,,test,$MASTER_MYPORT,master.sock);
select get_lock("lock1",null);
show binlog events from 79;
select release_lock("lock1");
drop table t0,t2;
| Thread |
|---|
| • bk commit into 4.1 tree (sasha:1.2457) BUG#7947 | Sasha Pachev | 7 Nov |