List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:September 25 2012 10:06am
Subject:bzr push into mysql-5.5-cluster-7.3-fk branch (pekka.nousiainen:3920 to
3921) WL#6244
View as plain text  
 3921 Pekka Nousiainen	2012-09-25
      wl#6244 valgrind1.diff
      valgrind warning in create_fks

    modified:
      sql/ha_ndb_ddl_fk.cc
 3920 Pekka Nousiainen	2012-09-22
      wl#6244 errcode6.diff
      more DDL error tests

    modified:
      mysql-test/suite/ndb/r/ndb_fk_bugs.result
      mysql-test/suite/ndb/t/ndb_fk_bugs.test
=== modified file 'sql/ha_ndb_ddl_fk.cc'
--- a/sql/ha_ndb_ddl_fk.cc	2012-09-22 10:10:42 +0000
+++ b/sql/ha_ndb_ddl_fk.cc	2012-09-25 09:58:34 +0000
@@ -294,7 +294,11 @@ ha_ndbcluster::create_fks(THD *thd, Ndb
 
     char parent_db[FN_REFLEN];
     char parent_name[FN_REFLEN];
-    if (fk->ref_table->db.length != 0 && fk->ref_table->db.str != 0)
+    /*
+     * Looking at Table_ident, testing for db.str first is safer
+     * for valgrind.  Do same with table.str too.
+     */
+    if (fk->ref_table->db.str != 0 && fk->ref_table->db.length != 0)
     {
       my_snprintf(parent_db, sizeof(parent_db), "%*s",
                   (int)fk->ref_table->db.length,
@@ -304,7 +308,7 @@ ha_ndbcluster::create_fks(THD *thd, Ndb
     {
       parent_db[0]= 0;
     }
-    if (fk->ref_table->table.length != 0 && fk->ref_table->table.str != 0)
+    if (fk->ref_table->table.str != 0 && fk->ref_table->table.length != 0)
     {
       my_snprintf(parent_name, sizeof(parent_name), "%*s",
                   (int)fk->ref_table->table.length,

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.3-fk branch (pekka.nousiainen:3920 to3921) WL#6244Pekka Nousiainen26 Sep