MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Tomas Ulin Date:February 12 2009 5:09pm
Subject:bzr push into mysql-5.1-telco-6.2 branch (tomas.ulin:2816 to 2817) Bug#42751
View as plain text  
 2817 Tomas Ulin	2009-02-12
      bug#42751 : TRIGGERs cause table locks in Cluster
modified:
  sql/ha_ndbcluster.cc

 2816 Jonas Oreland	2009-02-12
      ndb - bug#42549
        Fix alter (online) table wrt storage disk
        
modified:
  mysql-test/suite/ndb/r/ndb_alter_table_online.result
  mysql-test/suite/ndb/r/ndb_dd_alter.result
  mysql-test/suite/ndb/t/ndb_alter_table_online.test
  sql/ha_ndbcluster.cc
  sql/sql_table.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 push into mysql-5.1-telco-6.2 branch (tomas.ulin:2816 to 2817) Bug#42751Tomas Ulin12 Feb