List:Commits« Previous MessageNext Message »
From:Ingo Struewing Date:February 23 2009 3:50pm
Subject:bzr commit into mysql-6.0 branch (ingo.struewing:2777) Bug#43086
View as plain text  
#At file:///home2/mydev/bzrroot/mysql-6.0-bugs/ based on revid:ingo.struewing@stripped

 2777 Ingo Struewing	2009-02-23
      Bug#43086 - MERGE engine related warnings on Windows debug build
      
      A windows debug build created warnings in the error log.
      In myisammrg_attach_children_callback() the variable 'myisam'
      could be used without being set.
      
      Added initialization to silence compilers.
      Fixed usage of my_errno along the way.
     @ storage/myisammrg/ha_myisammrg.cc
        Bug#43086 - MERGE engine related warnings on Windows debug build
        Initialized 'myisam'.
        Moved setting of my_errno to the end.

    modified:
      storage/myisammrg/ha_myisammrg.cc
=== modified file 'storage/myisammrg/ha_myisammrg.cc'
--- a/storage/myisammrg/ha_myisammrg.cc	2009-02-13 12:48:06 +0000
+++ b/storage/myisammrg/ha_myisammrg.cc	2009-02-23 15:50:46 +0000
@@ -479,11 +479,9 @@ static MI_INFO *myisammrg_attach_childre
   TABLE         *parent= ha_myrg->table_ptr();
   TABLE         *child;
   TABLE_LIST    *child_l;
-  MI_INFO       *myisam;
+  MI_INFO       *myisam= NULL;
   DBUG_ENTER("myisammrg_attach_children_callback");
 
-  my_errno= 0;
-
   /* Get child list item. */
   child_l= ha_myrg->next_child_attach;
   if (!child_l)
@@ -544,11 +542,17 @@ static MI_INFO *myisammrg_attach_childre
                          child));
     my_errno= HA_ERR_WRONG_MRG_TABLE_DEF;
   }
+  else
+  {
+    /* Assure that my_errno is set correctly on return. */
+    my_errno= 0;
+  }
+
   DBUG_PRINT("myrg", ("MyISAM handle: %p  my_errno: %d",
                       myisam, my_errno));
 
  err:
-  DBUG_RETURN(my_errno ? NULL : myisam);
+  DBUG_RETURN(myisam);
 }
 
 


Attachment: [text/bzr-bundle] bzr/ingo.struewing@sun.com-20090223155046-yfjbyu1jixsq2ltz.bundle
Thread
bzr commit into mysql-6.0 branch (ingo.struewing:2777) Bug#43086Ingo Struewing23 Feb
  • Re: bzr commit into mysql-6.0 branch (ingo.struewing:2777) Bug#43086Sergey Vojtovich23 Feb
    • Re: bzr commit into mysql-6.0 branch (ingo.struewing:2777) Bug#43086Ingo Strüwing24 Feb