List:Internals« Previous MessageNext Message »
From:sasha Date:August 31 2001 9:56pm
Subject:bk commit into 3.23 tree
View as plain text  
Below is the list of changes that have just been commited into a local
3.23. repository of sasha. When sasha does a push, they will be
propogaged to the main repository and within 24 hours after the push into
the public repository. For information on how to access
the public repository see
http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet@stripped, 2001-08-31 15:55:58-06:00, sasha@stripped
  replicated get_lock() properly

  mysql-test/r/rpl_get_lock.result
    1.1 01/08/31 15:55:49 sasha@stripped +4 -0

  mysql-test/t/rpl_get_lock.test
    1.1 01/08/31 15:55:49 sasha@stripped +16 -0

  mysql-test/r/rpl_get_lock.result
    1.0 01/08/31 15:55:49 sasha@stripped +0 -0
    BitKeeper file /home/sasha/src/bk/mysql/mysql-test/r/rpl_get_lock.result

  mysql-test/t/rpl_get_lock.test
    1.0 01/08/31 15:55:49 sasha@stripped +0 -0
    BitKeeper file /home/sasha/src/bk/mysql/mysql-test/t/rpl_get_lock.test

  sql/item_func.cc
    1.41 01/08/31 15:55:49 sasha@stripped +17 -0
    log all lock releases to binary log for safe handling of get_lock()
    in updates

# 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:	/home/sasha/src/bk/mysql

--- 1.40/sql/item_func.cc	Tue Aug 21 16:45:04 2001
+++ 1.41/sql/item_func.cc	Fri Aug 31 15:55:49 2001
@@ -1399,6 +1399,23 @@
 void item_user_lock_release(ULL *ull)
 {
   ull->locked=0;
+  if (mysql_bin_log.is_open())
+  {
+    THD *thd = current_thd;
+    int save_errno;
+    char buf[256];
+    String tmp(buf,sizeof(buf));
+    tmp.length(0);
+    tmp.append("SELECT release_lock(\"");
+    tmp.append(ull->key,ull->key_length);
+    tmp.append("\")");
+    save_errno=thd->net.last_errno;
+    thd->net.last_errno=0;
+    thd->query_length=tmp.length();
+    Query_log_event qev(thd,tmp.ptr());
+    mysql_bin_log.write(&qev);
+    thd->net.last_errno=save_errno;
+  }
   if (--ull->count)
     pthread_cond_signal(&ull->cond);
   else
--- New file ---
+++ mysql-test/r/rpl_get_lock.result	01/08/31 15:55:49
get_lock("lock",3)
1
n
1

--- New file ---
+++ mysql-test/t/rpl_get_lock.test	01/08/31 15:55:49
source include/master-slave.inc;
connection master;
create table t1(n int);
insert into t1 values(get_lock("lock",2));
dirty_close master;
connection master1;
save_master_pos;
connection slave;
sync_with_master;
select get_lock("lock",3);
select * from t1;
connection master1;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;

Thread
bk commit into 3.23 treesasha31 Aug