MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Tomas Ulin Date:February 12 2009 5:08pm
Subject:bzr commit into mysql-5.1-telco-6.2 branch (tomas.ulin:2817) Bug#42751
View as plain text  
#At file:///home/tomas/mysql_src/mysql-5.1-telco-6.2/

 2817 Tomas Ulin	2009-02-12
      bug#42751 : TRIGGERs cause table locks in Cluster
modified:
  sql/ha_ndbcluster.cc

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2009-02-12 14:22:34 +0000
+++ b/sql/ha_ndbcluster.cc	2009-02-12 17:08:26 +0000
@@ -4386,8 +4386,11 @@ THR_LOCK_DATA **ha_ndbcluster::store_loc
     /* Since NDB does not currently have table locks
        this is treated as a ordinary lock */
 
+    const bool in_lock_tables = thd_in_lock_tables(thd);
+    const uint sql_command = thd_sql_command(thd);
     if ((lock_type >= TL_WRITE_CONCURRENT_INSERT &&
-         lock_type <= TL_WRITE) && !thd->in_lock_tables)      
+         lock_type <= TL_WRITE) &&
+        !(in_lock_tables && sql_command == SQLCOM_LOCK_TABLES))
       lock_type= TL_WRITE_ALLOW_WRITE;
     
     /* In queries of type INSERT INTO t1 SELECT ... FROM t2 ...

Thread
bzr commit into mysql-5.1-telco-6.2 branch (tomas.ulin:2817) Bug#42751Tomas Ulin12 Feb