List:Commits« Previous MessageNext Message »
From:kroki Date:May 6 2006 9:18am
Subject:bk commit into 5.0 tree (kroki:1.2115)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tomash. When tomash 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.2115 06/05/06 11:18:42 kroki@stripped +4 -0
  Merge mysql.com:/home/tomash/src/mysql_ab/tmp_merge
  into  mysql.com:/home/tomash/src/mysql_ab/mysql-5.0-merge

  sql/sql_acl.cc
    1.191 06/05/06 11:18:37 kroki@stripped +5 -31
    For the fix of bug#16372, use local version, since the fix for 5.0 is
    different, and will go in separate ChangeSet.

  sql/item_func.cc
    1.283 06/05/06 11:18:36 kroki@stripped +0 -0
    Manual merge of the fix for bug#16501.

  mysql-test/t/func_misc.test
    1.17 06/05/06 11:18:36 kroki@stripped +0 -0
    Manual merge of the fix for bug#16501.

  mysql-test/r/func_misc.result
    1.22 06/05/06 11:18:36 kroki@stripped +4 -4
    Manual merge of the fix for bug#16501.

# 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:	kroki
# Host:	moonlight.intranet
# Root:	/home/tomash/src/mysql_ab/mysql-5.0-merge/RESYNC

--- 1.282/sql/item_func.cc	2006-04-26 22:38:46 +04:00
+++ 1.283/sql/item_func.cc	2006-05-06 11:18:36 +04:00
@@ -3011,6 +3011,7 @@
 void item_user_lock_release(User_level_lock *ull)
 {
   ull->locked=0;
+  ull->thread_id= 0;
   if (--ull->count)
     pthread_cond_signal(&ull->cond);
   else
@@ -3218,6 +3219,7 @@
   {
     ull->locked=1;
     ull->thread=thd->real_id;
+    ull->thread_id= thd->thread_id;
     thd->ull=ull;
     error=0;
   }

--- 1.21/mysql-test/r/func_misc.result	2005-12-07 21:53:40 +03:00
+++ 1.22/mysql-test/r/func_misc.result	2006-05-06 11:18:36 +04:00
@@ -51,6 +51,42 @@
 a
 2004-01-06 12:34:00
 drop table t1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (conn CHAR(7), connection_id INT);
+INSERT INTO t1 VALUES ('default', CONNECTION_ID());
+SELECT GET_LOCK('bug16501',600);
+GET_LOCK('bug16501',600)
+1
+INSERT INTO t1 VALUES ('con1', CONNECTION_ID());
+SELECT IS_USED_LOCK('bug16501') = connection_id
+FROM t1
+WHERE conn = 'default';
+IS_USED_LOCK('bug16501') = connection_id
+1
+ SELECT GET_LOCK('bug16501',600);
+SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
+IS_USED_LOCK('bug16501') = CONNECTION_ID()
+1
+SELECT RELEASE_LOCK('bug16501');
+RELEASE_LOCK('bug16501')
+1
+SELECT IS_USED_LOCK('bug16501') = connection_id
+FROM t1
+WHERE conn = 'con1';
+IS_USED_LOCK('bug16501') = connection_id
+1
+GET_LOCK('bug16501',600)
+1
+SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
+IS_USED_LOCK('bug16501') = CONNECTION_ID()
+1
+SELECT RELEASE_LOCK('bug16501');
+RELEASE_LOCK('bug16501')
+1
+SELECT IS_USED_LOCK('bug16501');
+IS_USED_LOCK('bug16501')
+NULL
+DROP TABLE t1;
 create table t1 as select uuid(), length(uuid());
 show create table t1;
 Table	Create Table

--- 1.16/mysql-test/t/func_misc.test	2005-12-07 21:53:40 +03:00
+++ 1.17/mysql-test/t/func_misc.test	2006-05-06 11:18:36 +04:00
@@ -38,6 +38,44 @@
 
 drop table t1;
 
+
+#
+# Bug#16501: IS_USED_LOCK does not appear to work
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (conn CHAR(7), connection_id INT);
+INSERT INTO t1 VALUES ('default', CONNECTION_ID());
+
+SELECT GET_LOCK('bug16501',600);
+
+connect (con1,localhost,root,,);
+INSERT INTO t1 VALUES ('con1', CONNECTION_ID());
+SELECT IS_USED_LOCK('bug16501') = connection_id
+FROM t1
+WHERE conn = 'default';
+send SELECT GET_LOCK('bug16501',600);
+
+connection default;
+SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
+SELECT RELEASE_LOCK('bug16501');
+SELECT IS_USED_LOCK('bug16501') = connection_id
+FROM t1
+WHERE conn = 'con1';
+
+connection con1;
+reap;
+SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
+SELECT RELEASE_LOCK('bug16501');
+SELECT IS_USED_LOCK('bug16501');
+
+disconnect con1;
+connection default;
+
+DROP TABLE t1;
+
 # End of 4.1 tests
 
 #
Thread
bk commit into 5.0 tree (kroki:1.2115)kroki6 May